diff options
author | teboring <paulyang1211@gmail.com> | 2015-05-24 15:18:29 -0700 |
---|---|---|
committer | teboring <paulyang1211@gmail.com> | 2015-05-24 15:18:29 -0700 |
commit | b175c72e5ba055fa9a95ab54f70dc9ed952bc113 (patch) | |
tree | e0ea2a1faac557bc057331165ef80e3d07b74fc7 | |
parent | 8565e1e1efa5b5fa725aa0d01162a18614cd7119 (diff) | |
parent | f87e5b7e74d693387f140882a427c152e85592b1 (diff) | |
download | protobuf-b175c72e5ba055fa9a95ab54f70dc9ed952bc113.tar.gz protobuf-b175c72e5ba055fa9a95ab54f70dc9ed952bc113.tar.bz2 protobuf-b175c72e5ba055fa9a95ab54f70dc9ed952bc113.zip |
Merge branch '3.0.0-alpha-3-fix' of https://github.com/TeBoring/protobuf into 3.0.0-alpha-3-fix
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | src/google/protobuf/map_field_inl.h | 9 |
2 files changed, 14 insertions, 4 deletions
@@ -90,3 +90,12 @@ objectivec/ProtocolBuffers_OSX.xcodeproj/project.xcworkspace/xcuserdata/ objectivec/ProtocolBuffers_OSX.xcodeproj/xcuserdata/ objectivec/ProtocolBuffers_iOS.xcodeproj/project.xcworkspace/xcuserdata/ objectivec/ProtocolBuffers_iOS.xcodeproj/xcuserdata/ + +# Comformance test output +conformance/.libs/ +conformance/com/ +conformance/conformance-cpp +conformance/conformance-test-runner +conformance/conformance.pb.cc +conformance/conformance.pb.h +conformance/protoc_middleman diff --git a/src/google/protobuf/map_field_inl.h b/src/google/protobuf/map_field_inl.h index cbfc0c8f..5b4305f9 100644 --- a/src/google/protobuf/map_field_inl.h +++ b/src/google/protobuf/map_field_inl.h @@ -212,11 +212,11 @@ void MapField<Key, T, kKeyFieldType, kValueFieldType, default_enum_value>::SyncRepeatedFieldWithMapNoLock() const { if (repeated_field_ == NULL) { - if (arena_ == NULL) { + if (MapFieldBase::arena_ == NULL) { repeated_field_ = new RepeatedPtrField<Message>(); } else { - repeated_field_ = - Arena::CreateMessage<RepeatedPtrField<Message> >(arena_); + repeated_field_ = Arena::CreateMessage<RepeatedPtrField<Message> >( + MapFieldBase::arena_); } } const Map<Key, T>& map = GetInternalMap(); @@ -229,7 +229,8 @@ MapField<Key, T, kKeyFieldType, kValueFieldType, it != map.end(); ++it) { InitDefaultEntryOnce(); GOOGLE_CHECK(default_entry_ != NULL); - EntryType* new_entry = down_cast<EntryType*>(default_entry_->New(arena_)); + EntryType* new_entry = + down_cast<EntryType*>(default_entry_->New(MapFieldBase::arena_)); repeated_field->AddAllocated(new_entry); (*new_entry->mutable_key()) = it->first; (*new_entry->mutable_value()) = it->second; |