Use only explicit bool conversion operators
[oota-llvm.git] / include / llvm / Support / YAMLParser.h
index 6e4f57f6ab4a89bd3b1e625feebbfbabead5d5ab..338bb4b6f2b60eaae57da5aebc86c0aa4f4599c8 100644 (file)
@@ -516,7 +516,7 @@ public:
     if (isAtEnd() || Other.isAtEnd())
       return isAtEnd() && Other.isAtEnd();
 
-    return *Doc == *Other.Doc;
+    return Doc == Other.Doc;
   }
   bool operator !=(const document_iterator &Other) {
     return !(*this == Other);
@@ -543,7 +543,7 @@ public:
 
 private:
   bool isAtEnd() const {
-    return Doc == 0 || *Doc == 0;
+    return !Doc || !*Doc;
   }
 
   OwningPtr<Document> *Doc;