Tweak an enum declaration to make the clang compiler happy.
authortomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 3 Dec 2012 11:41:21 +0000 (11:41 +0000)
committertomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 3 Dec 2012 11:41:21 +0000 (11:41 +0000)
This exposes our "unknown type" to users, which is a loss of encapsulation.
TBR=robertphillips

http://codereview.appspot.com/6865050/

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

include/core/SkRRect.h
src/core/SkRRect.cpp

index 66c1ee2..1b52da9 100644 (file)
@@ -55,6 +55,9 @@ public:
      * by type(). The subtypes become progressively less restrictive.
      */
     enum Type {
+        // !< Internal indicator that the sub type must be computed.
+        kUnknown_Type = -1,
+
         // !< The RR is empty
         kEmpty_Type,
 
@@ -197,11 +200,6 @@ public:
     SkDEBUGCODE(void validate() const;)
 
 private:
-    enum {
-        //!< Internal indicator that the sub type must be computed.
-        kUnknown_Type = -1
-    };
-
     SkRect fRect;
     // Radii order is UL, UR, LR, LL. Use Corner enum to index into fRadii[]
     SkVector fRadii[4];
index db1c7dd..5740a19 100644 (file)
@@ -276,12 +276,9 @@ void SkRRect::validate() const {
             SkASSERT(!fRect.isEmpty());
             SkASSERT(!allRadiiZero && !allRadiiSame && !allCornersSquare);
             break;
-#if 0
-        // error: case value not in enumerated type 'SkRRect::Type
         case kUnknown_Type:
             // no limits on this
             break;
-#endif
     }
 }
 #endif // SK_DEBUG