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

Method asString

src/Engine/OptionInfo.cpp:265–272  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

263 * @return Pointer to the option.
264 */
265std::string *OptionInfo::asString() const
266{
267 if (_type != OPTION_STRING)
268 {
269 throw Exception(_id + " is not a string!");
270 }
271 return _ref.s;
272}
273
274}

Callers

nothing calls this directly

Calls 1

ExceptionClass · 0.85

Tested by

no test coverage detected