Skip to content

Commit 5e8396f

Browse files
committed
Performance fix for DynamicMessage: force GetRaw() to be inlined.
1 parent 740c4b0 commit 5e8396f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/google/protobuf/dynamic_message.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ DynamicMessage::DynamicMessage(DynamicMessageFactory::TypeInfo* type_info,
355355
SharedCtor(lock_factory);
356356
}
357357

358-
void* DynamicMessage::MutableRaw(int i) {
358+
inline void* DynamicMessage::MutableRaw(int i) {
359359
return OffsetToPointer(
360360
OffsetValue(type_info_->offsets[i], type_info_->type->field(i)->type()));
361361
}

0 commit comments

Comments
 (0)