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

Method asInt

src/Engine/OptionInfo.cpp:237–244  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

235 * @return Pointer to the option.
236 */
237int *OptionInfo::asInt() const
238{
239 if (_type != OPTION_INT)
240 {
241 throw Exception(_id + " is not an integer!");
242 }
243 return _ref.i;
244}
245
246/**
247 * Returns the pointer to the key option,

Callers 2

addSettingsMethod · 0.80
lstOptionsClickMethod · 0.80

Calls 1

ExceptionClass · 0.85

Tested by

no test coverage detected