Clean up Skia for Clang's -Wtautological-undefined-compare
authorMike Klein <mtklein@gmail.com>
Sat, 7 Jun 2014 23:15:14 +0000 (19:15 -0400)
committerMike Klein <mtklein@gmail.com>
Sat, 7 Jun 2014 23:15:14 +0000 (19:15 -0400)
This is blocking Chrome from rolling a new Clang, and me too for our TSAN bots.

BUG=chromium:381910

Review URL: https://codereview.chromium.org/325603002

include/core/SkTLazy.h
src/core/SkPaint.cpp
src/core/SkRegion.cpp

index 518beecc8571448573f8da98134d68553c3ff482..a291e22a137692226425776dc9efaafb860836bb 100644 (file)
@@ -66,11 +66,6 @@ public:
      *  contents.
      */
     T* set(const T& src) {
-        // Diagnoistic. May remove later. See crbug.com/364224
-        if (NULL == &src) {
-            sk_throw();
-        }
-
         if (this->isValid()) {
             *fPtr = src;
         } else {
index f3bf01bfafc5ca30e0507190a8ffee37f8a5efaa..78d947020b20442ac8bafcc63f14d752bf2f0c83 100644 (file)
@@ -106,11 +106,6 @@ SkPaint::SkPaint() {
 }
 
 SkPaint::SkPaint(const SkPaint& src) {
-    // Diagnoistic. May remove later. See crbug.com/364224
-    if (NULL == &src) {
-        sk_throw();
-    }
-
 #define COPY(field) field = src.field
 #define REF_COPY(field) field = SkSafeRef(src.field)
 
index 98670b6b520e003f46f46618391a90c8feb01c6e..24d7248582f681d6461976ac919d5985eda68b54 100644 (file)
@@ -212,12 +212,6 @@ char* SkRegion::toString() {
 ///////////////////////////////////////////////////////////////////////////////
 
 int SkRegion::count_runtype_values(int* itop, int* ibot) const {
-    if (this == NULL) {
-        *itop = SK_MinS32;
-        *ibot = SK_MaxS32;
-        return 0;
-    }
-
     int maxT;
 
     if (this->isRect()) {