MCPcopy Create free account
hub / github.com/Norbyte/bg3se / GetConfigBool

Function GetConfigBool

BG3Extender/Extender/Shared/ExtensionState.cpp:139–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137 }
138
139 std::optional<bool> GetConfigBool(Value const& node, std::string_view const& key)
140 {
141 auto v = node.FindMember(key.data());
142 if (v != node.MemberEnd()) {
143 if (v->value.IsBool()) {
144 return v->value.GetBool();
145 } else {
146 OsiError("Config option '" << key << "' should be a boolean.");
147 }
148 }
149
150 return {};
151 }
152
153 std::optional<int32_t> GetConfigInt(Value const& node, std::string_view const& key)
154 {

Callers

nothing calls this directly

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected