Fix warnings that cropped up building as 64-bit.
BUG=
R=bsalomon@google.com, bungeman@google.com
Author: mtklein@google.com
Review URL: https://chromiumcodereview.appspot.com/
13852013
git-svn-id: http://skia.googlecode.com/svn/trunk@8814
2bbb7eff-a529-9590-31e7-
b0007b416f81
enum LineType {
kHori_LineType,
kVert_LineType,
- kDiag_LineType
+ kDiag_LineType,
+ kLineTypeCount
};
static const char* LineTypeName(LineType lt) {
static const char* gNames[] = { "hori", "vert", "diag" };
- SkASSERT((size_t)lt <= SK_ARRAY_COUNT(gNames));
+ SK_COMPILE_ASSERT(kLineTypeCount == SK_ARRAY_COUNT(gNames), names_wrong_size);
return gNames[lt];
}
case kDiag_LineType:
matrix.setRotate(45, cx, cy);
break;
+ case kLineTypeCount:
+ // Not a real enum value.
+ break;
}
const SkScalar overshoot = 100*1000;
'conditions' : [
[ 'skia_arch_width == 64', {
'xcode_settings': {
- 'ARCHS': 'x86_64',
+ 'ARCHS': ['x86_64'],
},
}],
[ 'skia_arch_width == 32', {
'xcode_settings': {
- 'ARCHS': 'i386',
+ 'ARCHS': ['i386'],
},
}],
[ 'skia_warnings_as_errors', {
},
},
'xcode_settings': {
- 'ARCHS': 'armv6 armv7',
+ 'ARCHS': ['armv6', 'armv7'],
'CODE_SIGNING_REQUIRED': 'NO',
'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)',
1, // kMat44f_GrSLType
1, // kSampler2D_GrSLType
};
- GrAssert((size_t) type < GR_ARRAY_COUNT(kVecLengths));
+ GR_STATIC_ASSERT(kGrSLTypeCount == GR_ARRAY_COUNT(kVecLengths));
return kVecLengths[type];
}
GR_GL_REPEAT,
GR_GL_MIRRORED_REPEAT
};
- GrAssert((unsigned) tm <= SK_ARRAY_COUNT(gWrapModes));
+ GR_STATIC_ASSERT(SkShader::kTileModeCount == SK_ARRAY_COUNT(gWrapModes));
GR_STATIC_ASSERT(0 == SkShader::kClamp_TileMode);
GR_STATIC_ASSERT(1 == SkShader::kRepeat_TileMode);
GR_STATIC_ASSERT(2 == SkShader::kMirror_TileMode);
inView:(NSView *)controlView
editor:(NSText *)textObj
delegate:(id)anObject
- start:(int)selStart
- length:(int)selLength {
+ start:(NSInteger)selStart
+ length:(NSInteger)selLength {
aRect = [self drawingRectForBounds:aRect];
selectingOrEditing = YES;
[super selectWithFrame:aRect