aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
diff options
context:
space:
mode:
authoreissajamil@gmail.com <eissajamil@gmail.com>2015-03-29 15:57:19 -0500
committereissajamil@gmail.com <eissajamil@gmail.com>2015-03-29 15:57:19 -0500
commita1c5e45db3549276072033423ae786e91bfacde6 (patch)
tree5f8723c984788af5ea76d8625355792ec275b694 /src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
parent88eda4d7760e43c2aca8285aeba76f5bb2d3deb3 (diff)
downloadprotobuf-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
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc')
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc2
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);