MCPcopy Create free account
hub / github.com/crawl/crawl / read_bool

Function read_bool

crawl-ref/source/game-options.cc:59–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59bool read_bool(const string &field, bool def_value)
60{
61 const maybe_bool result = read_maybe_bool(field);
62 if (result.is_bool())
63 return bool(result);
64
65 Options.report_error("Bad boolean: %s (should be true or false)", field.c_str());
66 return def_value;
67}
68
69string GameOption::loadFromString(const std::string &, rc_line_type)
70{

Callers 1

initfile.ccFile · 0.85

Calls 3

read_maybe_boolFunction · 0.85
is_boolMethod · 0.80
report_errorMethod · 0.80

Tested by

no test coverage detected