mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 13:50:48 +00:00
- converted the ACS Stringbuilder macros into inline functions.
This commit is contained in:
parent
c651045ed3
commit
131eef9eb9
1 changed files with 19 additions and 10 deletions
|
@ -714,6 +714,25 @@ protected:
|
|||
FBehavior *activeBehavior;
|
||||
int InModuleScriptNumber;
|
||||
|
||||
TArray<FString> ACS_StringBuilderStack;
|
||||
|
||||
inline void STRINGBUILDER_START(FString &Builder)
|
||||
{
|
||||
if (Builder.IsNotEmpty() || ACS_StringBuilderStack.Size())
|
||||
{
|
||||
ACS_StringBuilderStack.Push(Builder);
|
||||
Builder = "";
|
||||
}
|
||||
}
|
||||
|
||||
inline void STRINGBUILDER_FINISH(FString &Builder)
|
||||
{
|
||||
if (!ACS_StringBuilderStack.Pop(Builder))
|
||||
{
|
||||
Builder = "";
|
||||
}
|
||||
}
|
||||
|
||||
void Link();
|
||||
void Unlink();
|
||||
void PutLast();
|
||||
|
@ -788,10 +807,6 @@ struct FBehavior::ArrayInfo
|
|||
};
|
||||
|
||||
TArray<FBehavior *> FBehavior::StaticModules;
|
||||
TArray<FString> ACS_StringBuilderStack;
|
||||
|
||||
#define STRINGBUILDER_START(Builder) if (Builder.IsNotEmpty() || ACS_StringBuilderStack.Size()) { ACS_StringBuilderStack.Push(Builder); Builder = ""; }
|
||||
#define STRINGBUILDER_FINISH(Builder) if (!ACS_StringBuilderStack.Pop(Builder)) { Builder = ""; }
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
@ -3468,12 +3483,6 @@ void DACSThinker::Tick ()
|
|||
|
||||
// GlobalACSStrings.Clear();
|
||||
|
||||
if (ACS_StringBuilderStack.Size())
|
||||
{
|
||||
int size = ACS_StringBuilderStack.Size();
|
||||
ACS_StringBuilderStack.Clear();
|
||||
I_Error("Error: %d garbage entries on ACS string builder stack.", size);
|
||||
}
|
||||
ACSTime.Unclock();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue