MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / reset

Method reset

src/Engine/OptionInfo.cpp:170–187  ·  view source on GitHub ↗

* Resets an option back to its default value. */

Source from the content-addressed store, hash-verified

168 * Resets an option back to its default value.
169 */
170void OptionInfo::reset() const
171{
172 switch (_type)
173 {
174 case OPTION_BOOL:
175 *(_ref.b) = _def.b;
176 break;
177 case OPTION_INT:
178 *(_ref.i) = _def.i;
179 break;
180 case OPTION_KEY:
181 *(_ref.k) = _def.k;
182 break;
183 case OPTION_STRING:
184 *(_ref.s) = _def.s;
185 break;
186 }
187}
188
189/**
190 * Returns the variable type of the option.

Callers 1

resetDefaultFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected