mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-02-25 17:22:24 +00:00
FEXCore/Config: Stop making temporary string copies
For config values that were string objects we were unnecessary creating copies each time the string was accessed. Convert the () operator over to returning a reference.
This commit is contained in:
parent
6cb0f52e94
commit
fe37c89109
@ -286,7 +286,13 @@ namespace Type {
|
||||
}
|
||||
|
||||
operator T() const { return ValueData; }
|
||||
|
||||
template <typename TT = T> requires (!std::is_same_v<TT, fextl::string>)
|
||||
T operator()() const { return ValueData; }
|
||||
|
||||
template <typename TT = T> requires (std::is_same_v<TT, fextl::string>)
|
||||
const T& operator()() const { return ValueData; }
|
||||
|
||||
Value<T>(T Value) { ValueData = std::move(Value); }
|
||||
fextl::list<T> &All() { return AppendList; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user