Fix of the previous commit.
This commit is contained in:
parent
164b0be064
commit
ab5e02f20c
1 changed files with 2 additions and 2 deletions
|
@ -501,11 +501,11 @@ void ConfigBase::set_deserialize(std::initializer_list<SetDeserializeItem> items
|
||||||
this->set_deserialize(item.opt_key, item.opt_value, substitutions_ctxt, item.append);
|
this->set_deserialize(item.opt_key, item.opt_value, substitutions_ctxt, item.append);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool looks_like_enum_value(const std::string &s)
|
static inline bool looks_like_enum_value(const std::string &value)
|
||||||
{
|
{
|
||||||
if (value.empty() || value.size() > 64 || ! isalpha(value.front()))
|
if (value.empty() || value.size() > 64 || ! isalpha(value.front()))
|
||||||
return false;
|
return false;
|
||||||
for (const char c : s)
|
for (const char c : value)
|
||||||
if (! (isalnum(c) || c == '_' || c == '-'))
|
if (! (isalnum(c) || c == '_' || c == '-'))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue