Skip to content

Commit 3c3c7c1

Browse files
committed
TGUIDeserialisable::Create remove s_flag
1 parent 8f4b3ce commit 3c3c7c1

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

Toshi/Source/TGui/TGUIDeserialisable.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,9 @@ IMPLEMENT_DYNAMIC(TGUIDeserialisable, TObject);
66

77
TGUIDeserialisable *TOSHI_API TGUIDeserialisable::Create(TGUIInterface *a_pInterface, const PProperties *a_pProperties)
88
{
9-
static bool s_flag = 0;
10-
static const TClass *s_pAllowedClass = TNULL;
11-
static TPCString s_propNameType = TPCString();
12-
if ((s_flag & 1) == 0) {
13-
s_flag |= 1;
14-
s_pAllowedClass = TClass::Find("TGUIDeserialisable", TNULL);
15-
}
16-
if ((s_flag & 2) == 0) {
17-
s_flag |= 2;
18-
s_propNameType = TSystem::GetCStringPool()->Get("type");
19-
}
20-
const PPropertyValue *pProperty = a_pProperties->GetProperty(s_propNameType);
9+
static const TClass *s_pAllowedClass = TClass::Find("TGUIDeserialisable", TNULL);
10+
static const TPCString s_propNameType = TSystem::GetCStringPool()->Get("type");
11+
const PPropertyValue *pProperty = a_pProperties->GetProperty(s_propNameType);
2112
if (!pProperty) {
2213
a_pInterface->Error("Deserialise: Object has no 'type' property specified");
2314
return TNULL;

0 commit comments

Comments
 (0)