From a1c5e45db3549276072033423ae786e91bfacde6 Mon Sep 17 00:00:00 2001 From: "eissajamil@gmail.com" Date: Sun, 29 Mar 2015 15:57:19 -0500 Subject: Removal of null check Removed the redundant check for NULL which is already correctly handled by used the delete --- src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc b/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc index 13ed0b64..08fec77b 100644 --- a/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc +++ b/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); -- cgit v1.2.3