data: windows crash fix

* fixed a crash on windows that occurred when the name of a token was stored in a container that was destroyed after a const & was returned.
This commit is contained in:
malte_langkabel
2014-10-06 11:18:27 +02:00
parent a294519cd1
commit 0f34f55844
5 changed files with 8 additions and 8 deletions
@@ -30,7 +30,7 @@ std::shared_ptr<TokenComponent> TokenComponentNameReferenced::copy() const
return std::make_shared<TokenComponentNameCached>(getFullName());
}
const std::string& TokenComponentNameReferenced::getName() const
std::string TokenComponentNameReferenced::getName() const
{
return m_searchNode->getName();
}
@@ -55,7 +55,7 @@ std::shared_ptr<TokenComponent> TokenComponentNameCached::copy() const
return std::make_shared<TokenComponentNameCached>(m_fullName);
}
const std::string& TokenComponentNameCached::getName() const
std::string TokenComponentNameCached::getName() const
{
return utility::split(m_fullName, SearchIndex::DELIMITER).back();
}