diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2015-10-09 12:38:31 -0700 |
---|---|---|
committer | Paul Yang <TeBoring@users.noreply.github.com> | 2015-10-09 12:38:31 -0700 |
commit | 49f24afb45b7add17af3ed4493fa0a94d1cc64da (patch) | |
tree | ffeba17cd9db828e86bb7318018305e6b4336d58 /src/google/protobuf/util/internal | |
parent | 693cb3d22a605d758cd7e020b4f4bddfbb5ca10c (diff) | |
parent | 7c14dc837b2fcd61ed244ced90debeb4b42d1119 (diff) |
Merge pull request #815 from TeBoring/third-party
Use std::get where it's available
Diffstat (limited to 'src/google/protobuf/util/internal')
-rw-r--r-- | src/google/protobuf/util/internal/protostream_objectwriter.cc | 2 | ||||
-rw-r--r-- | src/google/protobuf/util/internal/protostream_objectwriter_test.cc | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/google/protobuf/util/internal/protostream_objectwriter.cc b/src/google/protobuf/util/internal/protostream_objectwriter.cc index bd245999..08a2fb9a 100644 --- a/src/google/protobuf/util/internal/protostream_objectwriter.cc +++ b/src/google/protobuf/util/internal/protostream_objectwriter.cc @@ -1129,7 +1129,7 @@ Status ProtoStreamObjectWriter::RenderFieldMask(ProtoStreamObjectWriter* ow, // conversions as much as possible. Because ToSnakeCase sometimes returns the // wrong value. google::protobuf::scoped_ptr<ResultCallback1<util::Status, StringPiece> > callback( - NewPermanentCallback(&RenderOneFieldPath, ow)); + google::protobuf::internal::NewPermanentCallback(&RenderOneFieldPath, ow)); return DecodeCompactFieldMaskPaths(data.str(), callback.get()); } diff --git a/src/google/protobuf/util/internal/protostream_objectwriter_test.cc b/src/google/protobuf/util/internal/protostream_objectwriter_test.cc index 941fa71a..cb9f97f7 100644 --- a/src/google/protobuf/util/internal/protostream_objectwriter_test.cc +++ b/src/google/protobuf/util/internal/protostream_objectwriter_test.cc @@ -159,7 +159,12 @@ class BaseProtoStreamObjectWriterTest MATCHER_P(HasObjectLocation, expected, "Verifies the expected object location") { - string actual = std::tr1::get<0>(arg).ToString(); + string actual; +#if __cplusplus >= 201103L + actual = std::get<0>(arg).ToString(); +#else + actual = std::tr1::get<0>(arg).ToString(); +#endif if (actual.compare(expected) == 0) return true; *result_listener << "actual location is: " << actual; return false; |