MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / parseEnum

Function parseEnum

lib/config/proto.cc:188–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188static int32_t parseEnum(
189 const google::protobuf::FieldDescriptor* field, const std::string& value)
190{
191 const auto* enumfield = field->enum_type();
192 const auto* enumvalue = enumfield->FindValueByName(value);
193 if (!enumvalue)
194 error("unrecognised enum value '{}'", value);
195 return enumvalue->number();
196}
197
198template <typename T>
199static void updateRepeatedField(

Callers 1

setMethod · 0.85

Calls 1

errorFunction · 0.85

Tested by

no test coverage detected