From a627eab57c0c149e493d22673ba23f3e010c881c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 7 Oct 2014 19:07:05 +0100 Subject: [PATCH] Small refactor --- src/interned_string.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interned_string.cc b/src/interned_string.cc index 5afb460e5..b949233f2 100644 --- a/src/interned_string.cc +++ b/src/interned_string.cc @@ -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)