| 164 | } |
| 165 | |
| 166 | std::optional<fextl::string*> Get(ConfigOption Option) { |
| 167 | const auto it = OptionMap.find(Option); |
| 168 | if (it == OptionMap.end()) { |
| 169 | return std::nullopt; |
| 170 | } |
| 171 | |
| 172 | auto& Value = it->second; |
| 173 | LOGMAN_THROW_A_FMT(std::holds_alternative<fextl::string>(Value), "Tried to get config of invalid type!"); |
| 174 | |
| 175 | return &std::get<fextl::string>(Value); |
| 176 | } |
| 177 | |
| 178 | // Set will overwrite the object with a fextl::string without tests. |
| 179 | void Set(ConfigOption Option, const char* Data) { |