parse/enum: use references for range binding iteration to avoid copies
This commit is contained in:
parent
013fd2bb61
commit
681474c83d
@ -143,7 +143,7 @@ namespace cruft::parse::enumeration {
|
||||
static_assert (std::is_integral_v<ValueT>);
|
||||
|
||||
if constexpr (std::is_same_v<ValueT, underlying_type>) {
|
||||
for (auto const [key,val]: m_cache) {
|
||||
for (auto const &[key,val]: m_cache) {
|
||||
if (equal (key, str)) {
|
||||
str = str.consume (key.size ());
|
||||
// We must cast the value here so that enum
|
||||
|
Loading…
Reference in New Issue
Block a user