1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-18 08:51:46 +03:00

Small refactor

This commit is contained in:
Maxime Coste 2014-10-07 19:07:05 +01:00
parent ebaae7766a
commit a627eab57c

View File

@ -28,9 +28,9 @@ InternedString StringRegistry::acquire(StringView str)
}
size_t slot = it->second;
m_storage[slot].second++;
StringView storage_view{m_storage[slot].first.data(), (int)m_storage[slot].first.size()};
return InternedString{storage_view, slot};
auto& data = m_storage[slot];
++data.second;
return {{data.first.data(), (int)data.first.size()}, slot};
}
void StringRegistry::acquire(size_t slot)