mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Allow setting oneof message fields to the default value.
This commit is contained in:
@@ -162,6 +162,11 @@ void setProtoFieldFromString(ProtoField& protoField, const std::string& value)
|
||||
setRange((RangeProto*)reflection->MutableMessage(message, field), value);
|
||||
break;
|
||||
}
|
||||
if (field->real_containing_oneof() && value.empty())
|
||||
{
|
||||
reflection->MutableMessage(message, field);
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
default:
|
||||
Error() << "can't set this config value type";
|
||||
|
||||
Reference in New Issue
Block a user