mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Reduces string allocations in GUI and maths.
This commit is contained in:
@@ -130,6 +130,11 @@ CStrIntern::CStrIntern(const std::string& str)
|
||||
m = GetString(str.c_str(), str.length());
|
||||
}
|
||||
|
||||
CStrIntern::CStrIntern(const std::string_view str)
|
||||
{
|
||||
m = GetString(str.data(), str.length());
|
||||
}
|
||||
|
||||
u32 CStrIntern::GetHash() const
|
||||
{
|
||||
return m->hash;
|
||||
|
||||
Reference in New Issue
Block a user