Przeglądaj źródła

Removal of null check

Removed the redundant check for NULL which is already correctly handled
by used the delete
eissajamil@gmail.com 10 lat temu
rodzic
commit
a1c5e45db3

+ 1 - 1
src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc

@@ -107,7 +107,7 @@ class MockGeneratorContext : public GeneratorContext {
 
   virtual io::ZeroCopyOutputStream* Open(const string& filename) {
     string** map_slot = &files_[filename];
-    if (*map_slot != NULL) delete *map_slot;
+    delete *map_slot;
     *map_slot = new string;
 
     return new io::StringOutputStream(*map_slot);