diff options
author | Feng Xiao <xiaofeng@google.com> | 2015-11-02 14:10:36 -0800 |
---|---|---|
committer | Feng Xiao <xiaofeng@google.com> | 2015-11-02 14:10:36 -0800 |
commit | ec9f45b106e8c1f89f994a7229e74aee41804a4f (patch) | |
tree | a54835fdafe97f9a7d96933b4cb3689eb31b726f | |
parent | 59635c13d9e9ce21ee7ee4c1493c3d437fc9d87c (diff) | |
parent | 9659ea9e56bfc34f67d7ce73f946d5b58183a833 (diff) | |
download | protobuf-ec9f45b106e8c1f89f994a7229e74aee41804a4f.tar.gz protobuf-ec9f45b106e8c1f89f994a7229e74aee41804a4f.tar.bz2 protobuf-ec9f45b106e8c1f89f994a7229e74aee41804a4f.zip |
Merge pull request #931 from xfxyjwf/fix_compile
Fix compilation errors when built internally.
3 files changed, 4 insertions, 3 deletions
diff --git a/src/google/protobuf/util/field_comparator_test.cc b/src/google/protobuf/util/field_comparator_test.cc index 748c7d11..d3d34602 100644 --- a/src/google/protobuf/util/field_comparator_test.cc +++ b/src/google/protobuf/util/field_comparator_test.cc @@ -34,9 +34,10 @@ #include <google/protobuf/unittest.pb.h> #include <google/protobuf/descriptor.h> -#include <gtest/gtest.h> #include <google/protobuf/stubs/mathutil.h> +#include <gtest/gtest.h> + namespace google { namespace protobuf { namespace util { diff --git a/src/google/protobuf/util/internal/protostream_objectwriter.cc b/src/google/protobuf/util/internal/protostream_objectwriter.cc index 08a2fb9a..0958997c 100644 --- a/src/google/protobuf/util/internal/protostream_objectwriter.cc +++ b/src/google/protobuf/util/internal/protostream_objectwriter.cc @@ -602,7 +602,7 @@ void ProtoStreamObjectWriter::ProtoElement::TakeOneofIndex(int32 index) { bool ProtoStreamObjectWriter::ProtoElement::InsertMapKeyIfNotPresent( StringPiece map_key) { - return InsertIfNotPresent(&map_keys_, map_key); + return InsertIfNotPresent(&map_keys_, map_key.ToString()); } inline void ProtoStreamObjectWriter::InvalidName(StringPiece unknown_name, diff --git a/src/google/protobuf/util/internal/protostream_objectwriter.h b/src/google/protobuf/util/internal/protostream_objectwriter.h index 19f747fe..6e133679 100644 --- a/src/google/protobuf/util/internal/protostream_objectwriter.h +++ b/src/google/protobuf/util/internal/protostream_objectwriter.h @@ -305,7 +305,7 @@ class LIBPROTOBUF_EXPORT ProtoStreamObjectWriter : public StructuredObjectWriter // Set of map keys already seen for the type_. Used to validate incoming // messages so no map key appears more than once. - hash_set<StringPiece> map_keys_; + hash_set<string> map_keys_; GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS(ProtoElement); }; |