Goodbye String Stack!

This commit is contained in:
Jeff Hutchinson 2021-04-26 22:52:58 -04:00
parent f056e181b7
commit 964fde8f09
7 changed files with 507 additions and 558 deletions

View file

@ -174,14 +174,7 @@ class ConsoleValue
}
}
public:
explicit ConsoleValue()
{
type = ConsoleValueType::cvSTEntry;
s = const_cast<char*>(StringTable->EmptyString());
}
ConsoleValue(ConsoleValue&& ref) noexcept
TORQUE_FORCEINLINE void _move(ConsoleValue&& ref) noexcept
{
type = ref.type;
@ -207,6 +200,24 @@ public:
ref.setEmptyString();
}
public:
ConsoleValue()
{
type = ConsoleValueType::cvSTEntry;
s = const_cast<char*>(StringTable->EmptyString());
}
ConsoleValue(ConsoleValue&& ref) noexcept
{
_move(std::move(ref));
}
TORQUE_FORCEINLINE ConsoleValue& operator=(ConsoleValue&& ref) noexcept
{
_move(std::move(ref));
return *this;
}
ConsoleValue(const ConsoleValue&) = delete;
ConsoleValue& operator=(const ConsoleValue&) = delete;