diff options
author | eissajamil@gmail.com <eissajamil@gmail.com> | 2015-03-29 15:57:19 -0500 |
---|---|---|
committer | eissajamil@gmail.com <eissajamil@gmail.com> | 2015-03-29 15:57:19 -0500 |
commit | a1c5e45db3549276072033423ae786e91bfacde6 (patch) | |
tree | 5f8723c984788af5ea76d8625355792ec275b694 | |
parent | 88eda4d7760e43c2aca8285aeba76f5bb2d3deb3 (diff) | |
download | protobuf-a1c5e45db3549276072033423ae786e91bfacde6.tar.gz protobuf-a1c5e45db3549276072033423ae786e91bfacde6.tar.bz2 protobuf-a1c5e45db3549276072033423ae786e91bfacde6.zip |
Removal of null check
Removed the redundant check for NULL which is already correctly handled
by used the delete
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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); |