Turn on -Wall -Wextra on Mac, and fix all the warnings that crop up for /usr/bin/g++ and Clang 3.3.
BUG= R=bungeman@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/19569012 git-svn-id: http://skia.googlecode.com/svn/trunk@10255 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
6ae6383f56
commit
faa5ae456d
@ -72,7 +72,7 @@ protected:
|
||||
SkPath::Verb verb;
|
||||
SkPoint pts[4];
|
||||
|
||||
while ((verb = iter.next(pts)) != SkPath::kDone_Verb);
|
||||
while ((verb = iter.next(pts)) != SkPath::kDone_Verb) { }
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < N; ++i) {
|
||||
@ -80,7 +80,7 @@ protected:
|
||||
SkPath::Verb verb;
|
||||
SkPoint pts[4];
|
||||
|
||||
while ((verb = iter.next(pts)) != SkPath::kDone_Verb);
|
||||
while ((verb = iter.next(pts)) != SkPath::kDone_Verb) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -302,6 +302,9 @@
|
||||
'xcode_settings': {
|
||||
'OTHER_CPLUSPLUSFLAGS': [
|
||||
'-Werror',
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
'-Wno-unused-parameter',
|
||||
],
|
||||
},
|
||||
}],
|
||||
|
@ -45,9 +45,6 @@ private:
|
||||
SkConvolutionFilter1D* output,
|
||||
SkConvolutionProcs* convolveProcs);
|
||||
|
||||
// Subset of scaled destination bitmap to compute.
|
||||
SkIRect fOutBounds;
|
||||
|
||||
SkConvolutionFilter1D fXFilter;
|
||||
SkConvolutionFilter1D fYFilter;
|
||||
};
|
||||
@ -56,8 +53,7 @@ SkResizeFilter::SkResizeFilter(SkBitmapScaler::ResizeMethod method,
|
||||
int srcFullWidth, int srcFullHeight,
|
||||
int destWidth, int destHeight,
|
||||
const SkIRect& destSubset,
|
||||
SkConvolutionProcs* convolveProcs)
|
||||
: fOutBounds(destSubset) {
|
||||
SkConvolutionProcs* convolveProcs) {
|
||||
|
||||
// method will only ever refer to an "algorithm method".
|
||||
SkASSERT((SkBitmapScaler::RESIZE_FIRST_ALGORITHM_METHOD <= method) &&
|
||||
|
@ -121,7 +121,7 @@ SkPicture::SkPicture() {
|
||||
fWidth = fHeight = 0;
|
||||
}
|
||||
|
||||
SkPicture::SkPicture(const SkPicture& src) {
|
||||
SkPicture::SkPicture(const SkPicture& src) : INHERITED() {
|
||||
fWidth = src.fWidth;
|
||||
fHeight = src.fHeight;
|
||||
fRecord = NULL;
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
/**
|
||||
* Copies another draw state.
|
||||
**/
|
||||
GrDrawState(const GrDrawState& state) {
|
||||
GrDrawState(const GrDrawState& state) : INHERITED() {
|
||||
GR_DEBUGCODE(fBlockEffectRemovalCnt = 0;)
|
||||
*this = state;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
SK_DECLARE_INST_COUNT(Caps)
|
||||
|
||||
GrDrawTargetCaps() { this->reset(); }
|
||||
GrDrawTargetCaps(const GrDrawTargetCaps& other) { *this = other; }
|
||||
GrDrawTargetCaps(const GrDrawTargetCaps& other) : INHERITED() { *this = other; }
|
||||
GrDrawTargetCaps& operator= (const GrDrawTargetCaps&);
|
||||
|
||||
virtual void reset();
|
||||
|
@ -36,7 +36,7 @@ SkLayer::SkLayer() {
|
||||
#endif
|
||||
}
|
||||
|
||||
SkLayer::SkLayer(const SkLayer& src) {
|
||||
SkLayer::SkLayer(const SkLayer& src) : INHERITED() {
|
||||
fParent = NULL;
|
||||
m_opacity = src.m_opacity;
|
||||
m_size = src.m_size;
|
||||
|
@ -56,8 +56,8 @@
|
||||
}
|
||||
|
||||
- (void)updateMenu:(const SkOSMenu*)menu {
|
||||
// the first menu is always assumed to be the static, the second is
|
||||
// repopulated every time over and over again
|
||||
// the first menu is always assumed to be the static, the second is
|
||||
// repopulated every time over and over again
|
||||
|
||||
// seems pretty weird that we have to get rid of the const'ness here,
|
||||
// but trying to propagate the const'ness through all the way to the fMenus
|
||||
@ -91,7 +91,7 @@
|
||||
const SkOSMenu::Item* item = menuitems[i];
|
||||
SkOptionItem* option = [[SkOptionItem alloc] init];
|
||||
option.fItem = item;
|
||||
|
||||
|
||||
if (SkOSMenu::kList_Type == item->getType()) {
|
||||
int index = 0, count = 0;
|
||||
SkOSMenu::FindListItemCount(*item->getEvent(), &count);
|
||||
@ -118,10 +118,10 @@
|
||||
SkOSMenu::FindSliderValue(*item->getEvent(), item->getSlotName(), &value);
|
||||
SkOSMenu::FindSliderMin(*item->getEvent(), &min);
|
||||
SkOSMenu::FindSliderMax(*item->getEvent(), &max);
|
||||
option.fCell = [self createSlider:value
|
||||
min:min
|
||||
option.fCell = [self createSlider:value
|
||||
min:min
|
||||
max:max];
|
||||
break;
|
||||
break;
|
||||
case SkOSMenu::kSwitch_Type:
|
||||
SkOSMenu::FindSwitchState(*item->getEvent(), item->getSlotName(), &state);
|
||||
option.fCell = [self createSwitch:(BOOL)state];
|
||||
@ -152,9 +152,9 @@
|
||||
if (columnIndex == 0) {
|
||||
const SkOSMenu::Item* item = ((SkOptionItem*)[fItems objectAtIndex:row]).fItem;
|
||||
NSString* label = [NSString stringWithUTF8String:item->getLabel()];
|
||||
if (fShowKeys)
|
||||
if (fShowKeys)
|
||||
return [NSString stringWithFormat:@"%@ (%c)", label, item->getKeyEquivalent()];
|
||||
else
|
||||
else
|
||||
return label;
|
||||
}
|
||||
else
|
||||
@ -164,7 +164,7 @@
|
||||
- (NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
|
||||
if (tableColumn) {
|
||||
int columnIndex = [tableView columnWithIdentifier:[tableColumn identifier]];
|
||||
if (columnIndex == 1)
|
||||
if (columnIndex == 1)
|
||||
return [((SkOptionItem*)[fItems objectAtIndex:row]).fCell copy];
|
||||
else
|
||||
return [[[SkTextFieldCell alloc] init] autorelease];
|
||||
@ -180,7 +180,7 @@
|
||||
const SkOSMenu::Item* item = option.fItem;
|
||||
switch (item->getType()) {
|
||||
case SkOSMenu::kAction_Type:
|
||||
break;
|
||||
break;
|
||||
case SkOSMenu::kList_Type:
|
||||
[cell selectItemAtIndex:[(NSPopUpButtonCell*)storedCell indexOfSelectedItem]];
|
||||
break;
|
||||
@ -259,7 +259,7 @@
|
||||
[cell selectItemAtIndex:index];
|
||||
[cell setArrowPosition:NSPopUpArrowAtBottom];
|
||||
[cell setBezelStyle:NSSmallSquareBezelStyle];
|
||||
return cell;
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (NSCell*)createSlider:(float)value min:(float)min max:(float)max {
|
||||
@ -278,7 +278,7 @@
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (NSCell*)createTextField:(NSString*)placeHolder; {
|
||||
- (NSCell*)createTextField:(NSString*)placeHolder {
|
||||
SkTextFieldCell* cell = [[[SkTextFieldCell alloc] init] autorelease];
|
||||
[cell setEditable:YES];
|
||||
[cell setStringValue:@""];
|
||||
|
Loading…
Reference in New Issue
Block a user