From 9659ea9e56bfc34f67d7ce73f946d5b58183a833 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Mon, 2 Nov 2015 12:39:27 -0800 Subject: Fix compilation errors when built internally. 1. mathlimits.h must be included before the inclusion of cmath (which gtest/gtest.h seems to include). 2. hash function for StringPiece doesn't work. Change-Id: I358a25d941a25b10b39fe76780eda41557699811 --- src/google/protobuf/util/internal/protostream_objectwriter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/google/protobuf/util/internal/protostream_objectwriter.cc') 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, -- cgit v1.2.3