Did a full code coverage review and improved many of the tests and a bunch of code. I'll do one more final walk through all the code before getting back to work on the new combat system.

This commit is contained in:
Zed A. Shaw 2025-03-17 15:23:47 -04:00
parent 113a4a3b3e
commit d3158291f7
29 changed files with 119 additions and 1218 deletions

View file

@ -15,13 +15,6 @@ json &Config::operator[](const std::string &key) {
return $config[key];
}
std::wstring Config::wstring(const std::string key) {
dbc::check($config.contains(key), fmt::format("ERROR wstring in config, key {} doesn't exist.", key));
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> $converter;
const std::string& str_val = $config[key];
return $converter.from_bytes(str_val);
}
std::wstring Config::wstring(const std::string main_key, const std::string sub_key) {
dbc::check($config.contains(main_key), fmt::format("ERROR wstring main/key in config, main_key {} doesn't exist.", main_key));
dbc::check($config[main_key].contains(sub_key), fmt::format("ERROR wstring in config, main_key/key {}/{} doesn't exist.", main_key, sub_key));