MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Clear

Method Clear

code/qcommon/stringed_ingame.cpp:144–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142
143
144void CStringEdPackage::Clear( SE_BOOL bChangingLanguages )
145{
146 m_StringEntries.clear();
147
148 if ( !bChangingLanguages )
149 {
150 // if we're changing languages, then I'm going to leave these alone. This is to do with any (potentially) cached
151 // flag bitmasks on the game side. It shouldn't matter since all files are written out at once using the build
152 // command in StringEd. But if ever someone changed a file by hand, or added one, or whatever, and it had a
153 // different set of flags declared, or the strings were in a different order, then the flags might also change
154 // the order I see them in, and hence their indexes and masks. This should never happen unless people mess with
155 // the .STR files by hand and delete some, but this way makes sure it'll all work just in case...
156 //
157 // ie. flags stay defined once they're defined, and only the destructor (at app-end) kills them.
158 //
159 m_vstrFlagNames.clear();
160 m_mapFlagMasks.clear();
161 }
162
163 m_bEndMarkerFound_ParseOnly = SE_FALSE;
164 m_strCurrentEntryRef_ParseOnly = "";
165 m_strCurrentEntryEnglish_ParseOnly = "";
166 //
167 // the other vars are cleared in SetupNewFileParse(), and are ok to not do here.
168 //
169}
170
171
172

Callers 3

SE_NewLanguageFunction · 0.45
SE_InitFunction · 0.45
SE_ShutDownFunction · 0.45

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected