diff --git a/shared/Base/Utility.hpp b/shared/Base/Utility.hpp index 3bd55477..3726b39d 100644 --- a/shared/Base/Utility.hpp +++ b/shared/Base/Utility.hpp @@ -108,6 +108,11 @@ SQRESULT SqThrowErrorF(HSQUIRRELVM vm, CCStr str, ...); */ bool SToB(CSStr str); +/* ------------------------------------------------------------------------------------------------ + * Retrieve a reference to a dummy StackStrF instance. +*/ +StackStrF & DummyStackStrF(); + /* ------------------------------------------------------------------------------------------------ * Retrieve a reference to a null script object. */ diff --git a/shared/Base/Utility.inl b/shared/Base/Utility.inl index 00f7bf1d..275a6820 100644 --- a/shared/Base/Utility.inl +++ b/shared/Base/Utility.inl @@ -244,6 +244,14 @@ bool SToB(CSStr str) std::strcmp(buffer, "on") == 0 || std::strcmp(buffer, "1") == 0) ? true : false; } +// ------------------------------------------------------------------------------------------------ +StackStrF & DummyStackStrF() +{ + static StackStrF s; + s.Release(); + return s; +} + // ------------------------------------------------------------------------------------------------ Object & NullObject() {