FullscreenUI: Avoid per-frame memory allocations with SmallString
This commit is contained in:
@ -370,12 +370,12 @@ std::string InputManager::ConvertInputBindingKeysToString(InputBindingInfo::Type
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
bool InputManager::PrettifyInputBinding(std::string& binding)
|
||||
bool InputManager::PrettifyInputBinding(SmallStringBase& binding)
|
||||
{
|
||||
if (binding.empty())
|
||||
return false;
|
||||
|
||||
const std::string_view binding_view(binding);
|
||||
const std::string_view binding_view = binding.view();
|
||||
|
||||
SmallString ret;
|
||||
bool changed = false;
|
||||
@ -408,7 +408,7 @@ bool InputManager::PrettifyInputBinding(std::string& binding)
|
||||
}
|
||||
|
||||
if (changed)
|
||||
binding = ret.view();
|
||||
binding = ret;
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user