Index: third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc |
diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc |
index c3e9fe7448661eb209055dc77f0071c1b5bd22e6..77451ab1bff81b2377da93af2f661d98021e8630 100644 |
--- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc |
+++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc |
@@ -54,6 +54,7 @@ |
#include <google/protobuf/stubs/substitute.h> |
#include <google/protobuf/testing/file.h> |
+#include <google/protobuf/testing/file.h> |
#include <google/protobuf/testing/googletest.h> |
#include <gtest/gtest.h> |
@@ -107,7 +108,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); |