aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Xiao <xiaofeng@google.com>2015-08-25 22:35:24 -0700
committerFeng Xiao <xiaofeng@google.com>2015-08-25 22:35:24 -0700
commitc80f7c6f3c51667bf7aa51ade2c816b50e857316 (patch)
tree36cfcc7dbe1dc91ecccca10226ed9bc4a9b1a4c2
parentf9237d2bcde0e326bcc2fdb88ee0a67d79c9b13c (diff)
parentd9ab86cdbf87915319020241de65b821be068db7 (diff)
downloadprotobuf-c80f7c6f3c51667bf7aa51ade2c816b50e857316.tar.gz
protobuf-c80f7c6f3c51667bf7aa51ade2c816b50e857316.tar.bz2
protobuf-c80f7c6f3c51667bf7aa51ade2c816b50e857316.zip
Merge pull request #742 from xfxyjwf/c11_compile
Fix compile issues with -std=c++11
-rw-r--r--src/google/protobuf/map_test.cc2
-rw-r--r--src/google/protobuf/map_unittest.proto4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/google/protobuf/map_test.cc b/src/google/protobuf/map_test.cc
index a74801d9..16a24c25 100644
--- a/src/google/protobuf/map_test.cc
+++ b/src/google/protobuf/map_test.cc
@@ -2188,7 +2188,7 @@ TEST_F(MapFieldInDynamicMessageTest, MapSpaceUsed) {
TEST_F(MapFieldInDynamicMessageTest, RecursiveMap) {
TestRecursiveMapMessage from;
- (*from.mutable_a())[0];
+ (*from.mutable_a())[""];
string data = from.SerializeAsString();
google::protobuf::scoped_ptr<Message> to(
factory_.GetPrototype(recursive_map_descriptor_)->New());
diff --git a/src/google/protobuf/map_unittest.proto b/src/google/protobuf/map_unittest.proto
index d3b525a0..aea1e8ce 100644
--- a/src/google/protobuf/map_unittest.proto
+++ b/src/google/protobuf/map_unittest.proto
@@ -116,7 +116,7 @@ message MessageContainingEnumCalledType {
enum Type {
TYPE_FOO = 0;
}
- map<int32, MessageContainingEnumCalledType> type = 1;
+ map<string, MessageContainingEnumCalledType> type = 1;
}
// Previously, message cannot contain map field called "entry".
@@ -125,5 +125,5 @@ message MessageContainingMapCalledEntry {
}
message TestRecursiveMapMessage {
- map<int32, TestRecursiveMapMessage> a = 1;
+ map<string, TestRecursiveMapMessage> a = 1;
}