MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / clearAllFields

Method clearAllFields

Engine/source/util/settings.cpp:173–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173void Settings::clearAllFields()
174{
175 // Fetch Dynamic-Field Dictionary.
176 SimFieldDictionary* pFieldDictionary = getFieldDictionary();
177
178 // Any Field Dictionary?
179 if ( pFieldDictionary == NULL )
180 {
181 // No, so we're done.
182 return;
183 }
184
185 // Iterate fields.
186 for ( SimFieldDictionaryIterator itr(pFieldDictionary); *itr; ++itr )
187 {
188 // Fetch Field Entry.
189 SimFieldDictionary::Entry* fieldEntry = *itr;
190
191 // don't remove default field values
192 if (dStrEndsWith(fieldEntry->slotName, "_default"))
193 continue;
194
195 // remove it.
196 pFieldDictionary->setFieldValue( fieldEntry->slotName, "" );
197 }
198}
199
200bool Settings::write()
201{

Callers

nothing calls this directly

Calls 2

dStrEndsWithFunction · 0.85
setFieldValueMethod · 0.45

Tested by

no test coverage detected