Small refactor
This commit is contained in:
parent
ebaae7766a
commit
a627eab57c
|
@ -28,9 +28,9 @@ InternedString StringRegistry::acquire(StringView str)
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t slot = it->second;
|
size_t slot = it->second;
|
||||||
m_storage[slot].second++;
|
auto& data = m_storage[slot];
|
||||||
StringView storage_view{m_storage[slot].first.data(), (int)m_storage[slot].first.size()};
|
++data.second;
|
||||||
return InternedString{storage_view, slot};
|
return {{data.first.data(), (int)data.first.size()}, slot};
|
||||||
}
|
}
|
||||||
|
|
||||||
void StringRegistry::acquire(size_t slot)
|
void StringRegistry::acquire(size_t slot)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user