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

Method save

src/Engine/OptionInfo.cpp:148–165  ·  view source on GitHub ↗

* Saves an option value to the corresponding YAML. * @param node Options YAML node. */

Source from the content-addressed store, hash-verified

146 * @param node Options YAML node.
147 */
148void OptionInfo::save(YAML::Node &node) const
149{
150 switch (_type)
151 {
152 case OPTION_BOOL:
153 node[_id] = *(_ref.b);
154 break;
155 case OPTION_INT:
156 node[_id] = *(_ref.i);
157 break;
158 case OPTION_KEY:
159 node[_id] = (int)*(_ref.k);
160 break;
161 case OPTION_STRING:
162 node[_id] = *(_ref.s);
163 break;
164 }
165}
166
167/**
168 * Resets an option back to its default value.

Callers 2

saveFunction · 0.45
quitMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected