MCPcopy Create free account
hub / github.com/ZDoom/gzdoom / readMacros

Method readMacros

src/common/engine/stringtable.cpp:162–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160//==========================================================================
161
162bool FStringTable::readMacros(const char* buffer, size_t size)
163{
164 auto data = parseCSV(buffer, size);
165
166 allMacros.Clear();
167 for (unsigned i = 1; i < data.Size(); i++)
168 {
169 auto macroname = data[i][0];
170 FName name = macroname.GetChars();
171
172 StringMacro macro;
173
174 for (int k = 0; k < 4; k++)
175 {
176 macro.Replacements[k] = data[i][k+2];
177 }
178 allMacros.Insert(name, macro);
179 }
180 return true;
181}
182
183//==========================================================================
184//

Callers

nothing calls this directly

Calls 4

ClearMethod · 0.45
SizeMethod · 0.45
GetCharsMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected