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

Method asKey

src/Engine/OptionInfo.cpp:251–258  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

249 * @return Pointer to the option.
250 */
251SDLKey *OptionInfo::asKey() const
252{
253 if (_type != OPTION_KEY)
254 {
255 throw Exception(_id + " is not a key!");
256 }
257 return _ref.k;
258}
259
260/**
261 * Returns the pointer to the string option,

Callers 3

addControlsMethod · 0.80
lstControlsClickMethod · 0.80
lstControlsKeyPressMethod · 0.80

Calls 1

ExceptionClass · 0.85

Tested by

no test coverage detected