Skip to content

Commit

Permalink
Performance fix for DynamicMessage: force GetRaw() to be inlined.
Browse files Browse the repository at this point in the history
  • Loading branch information
haberman committed Sep 24, 2021
1 parent 740c4b0 commit 5e8396f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/google/protobuf/dynamic_message.cc
Expand Up @@ -355,7 +355,7 @@ DynamicMessage::DynamicMessage(DynamicMessageFactory::TypeInfo* type_info,
SharedCtor(lock_factory);
}

void* DynamicMessage::MutableRaw(int i) {
inline void* DynamicMessage::MutableRaw(int i) {
return OffsetToPointer(
OffsetValue(type_info_->offsets[i], type_info_->type->field(i)->type()));
}
Expand Down

0 comments on commit 5e8396f

Please sign in to comment.