Fix nits
authorbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 3 Oct 2011 13:17:22 +0000 (13:17 +0000)
committerbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 3 Oct 2011 13:17:22 +0000 (13:17 +0000)
Review URL: http://codereview.appspot.com/5155043/

git-svn-id: http://skia.googlecode.com/svn/trunk@2393 2bbb7eff-a529-9590-31e7-b0007b416f81

gpu/src/GrGLProgram.h
gpu/src/GrGpuGLShaders.cpp
src/animator/SkScriptTokenizer.cpp

index ced3e61..a79f877 100644 (file)
@@ -125,7 +125,7 @@ private:
             uint8_t fKernelWidth;
 
             inline bool isEnabled() const {
-                return 0 != (fOptFlags & kIsEnabled_OptFlagBit);
+                return SkToBool(fOptFlags & kIsEnabled_OptFlagBit);
             }
             inline void setEnabled(bool newValue) {
                 if (newValue) {
index 20ecca5..80f0268 100644 (file)
@@ -238,9 +238,8 @@ bool GrGpuGLShaders::programUnitTest() {
                 }
                 pdesc.fEdgeAANumEdges = 0;
             } else {
-                pdesc.fEdgeAANumEdges = 
-                    static_cast<int8_t>(1 + random.nextF() *
-                                        this->getMaxEdges());
+                pdesc.fEdgeAANumEdges =  SkToS8(1 + random.nextF() *
+                                                this->getMaxEdges());
                 pdesc.fEdgeAAConcave = random.nextF() > .5f;
             }
         } else {
index 6502c34..b2b6e4f 100644 (file)
@@ -603,7 +603,7 @@ scalarCommon:
         }
         if (ch ==  '.') {
             if (fTokenLength == 0) {
-                SkDEBUGCODE(SkScriptValue2 scriptValue);
+                SkDEBUGCODE(SkScriptValue2 scriptValue;)
                 SkDEBUGCODE(scriptValue.fOperand.fObject = NULL);
                 int tokenLength = token_length(++script);
                 const char* token = script;