mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
Goodbye String Stack!
This commit is contained in:
parent
f056e181b7
commit
964fde8f09
7 changed files with 507 additions and 558 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue