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

Method asBool

src/Engine/OptionInfo.cpp:223–230  ·  view source on GitHub ↗

* Returns the pointer to the boolean option, * or throws an exception if it's not a boolean. * @return Pointer to the option. */

Source from the content-addressed store, hash-verified

221 * @return Pointer to the option.
222 */
223bool *OptionInfo::asBool() const
224{
225 if (_type != OPTION_BOOL)
226 {
227 throw Exception(_id + " is not a boolean!");
228 }
229 return _ref.b;
230}
231
232/**
233 * Returns the pointer to the integer option,

Callers 2

addSettingsMethod · 0.80
lstOptionsClickMethod · 0.80

Calls 1

ExceptionClass · 0.85

Tested by

no test coverage detected