diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2018-09-07 16:15:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-07 16:15:38 -0700 |
commit | f9d8138376765d229a32635c9209061e4e4aed8c (patch) | |
tree | 50719686fd7262f405c9bda8694d6c72e7c038b8 /src/google/protobuf/reflection_internal.h | |
parent | 2e7563f40ec7f901ae8ae1cc749d701fa07e211d (diff) | |
parent | e53be9bce4556cf0d13e24f1a25a7d75f663144f (diff) | |
download | protobuf-f9d8138376765d229a32635c9209061e4e4aed8c.tar.gz protobuf-f9d8138376765d229a32635c9209061e4e4aed8c.tar.bz2 protobuf-f9d8138376765d229a32635c9209061e4e4aed8c.zip |
Merge pull request #5109 from haberman/integrate
Down-integrate from google3.
Diffstat (limited to 'src/google/protobuf/reflection_internal.h')
-rw-r--r-- | src/google/protobuf/reflection_internal.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/google/protobuf/reflection_internal.h b/src/google/protobuf/reflection_internal.h index f664d8e2..ff62d58d 100644 --- a/src/google/protobuf/reflection_internal.h +++ b/src/google/protobuf/reflection_internal.h @@ -293,7 +293,7 @@ class RepeatedFieldPrimitiveAccessor final : public RepeatedFieldWrapper<T> { // Default implementation of RepeatedFieldAccessor for string fields with // ctype=STRING. class RepeatedPtrFieldStringAccessor final - : public RepeatedPtrFieldWrapper<string> { + : public RepeatedPtrFieldWrapper<std::string> { typedef void Field; typedef void Value; using RepeatedFieldAccessor::Add; @@ -305,26 +305,26 @@ class RepeatedPtrFieldStringAccessor final if (this == other_mutator) { MutableRepeatedField(data)->Swap(MutableRepeatedField(other_data)); } else { - RepeatedPtrField<string> tmp; + RepeatedPtrField<std::string> tmp; tmp.Swap(MutableRepeatedField(data)); int other_size = other_mutator->Size(other_data); for (int i = 0; i < other_size; ++i) { - Add<string>(data, other_mutator->Get<string>(other_data, i)); + Add<std::string>(data, other_mutator->Get<std::string>(other_data, i)); } int size = Size(data); other_mutator->Clear(other_data); for (int i = 0; i < size; ++i) { - other_mutator->Add<string>(other_data, tmp.Get(i)); + other_mutator->Add<std::string>(other_data, tmp.Get(i)); } } } protected: - string* New(const Value*) const override { return new string(); } - void ConvertToT(const Value* value, string* result) const override { - *result = *static_cast<const string*>(value); + std::string* New(const Value*) const override { return new std::string(); } + void ConvertToT(const Value* value, std::string* result) const override { + *result = *static_cast<const std::string*>(value); } - const Value* ConvertFromT(const string& value, + const Value* ConvertFromT(const std::string& value, Value* scratch_space) const override { return static_cast<const Value*>(&value); } |