MCPcopy Create free account
hub / github.com/comaps/comaps / SetDefaultNameIfEmpty

Method SetDefaultNameIfEmpty

libs/indexer/feature_data.cpp:243–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243bool FeatureParamsBase::SetDefaultNameIfEmpty(std::string const & s)
244{
245 std::string_view existing;
246 if (name.GetString(localisation::kDefaultNameIndex, existing))
247 return existing == s;
248
249 name.AddString(localisation::kDefaultNameIndex, s);
250 return true;
251}
252
253bool FeatureParamsBase::operator==(FeatureParamsBase const & rhs) const
254{

Callers 2

PreSerializeMethod · 0.80
GetNameAndTypeFunction · 0.80

Calls 2

GetStringMethod · 0.45
AddStringMethod · 0.45

Tested by

no test coverage detected