| 165 | } |
| 166 | |
| 167 | std::optional<STDString> GetConfigString(Value const& node, std::string_view const& key) |
| 168 | { |
| 169 | auto v = node.FindMember(key.data()); |
| 170 | if (v != node.MemberEnd()) { |
| 171 | if (v->value.IsString()) { |
| 172 | return v->value.GetString(); |
| 173 | } else { |
| 174 | OsiError("Config option '" << key << "' should be a string."); |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | return {}; |
| 179 | } |
| 180 | |
| 181 | bool LoadModConfig(Module const & mod, Document& json, ExtensionModConfig & config) |
| 182 | { |
no test coverage detected