mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-04-19 10:51:18 +00:00
Check for TOML_EXCEPTIONS when loading TOMLs.
This commit is contained in:
parent
b4b4aac788
commit
ca39a3b992
@ -3,7 +3,11 @@
|
||||
void RecompilerConfig::Load(const std::string_view& configFilePath)
|
||||
{
|
||||
directoryPath = configFilePath.substr(0, configFilePath.find_last_of("\\/") + 1);
|
||||
toml::table toml = toml::parse_file(configFilePath);
|
||||
toml::table toml = toml::parse_file(configFilePath)
|
||||
#if !TOML_EXCEPTIONS
|
||||
.table()
|
||||
#endif
|
||||
;
|
||||
|
||||
if (auto mainPtr = toml["main"].as_table())
|
||||
{
|
||||
@ -56,7 +60,11 @@ void RecompilerConfig::Load(const std::string_view& configFilePath)
|
||||
|
||||
if (!switchTableFilePath.empty())
|
||||
{
|
||||
toml::table switchToml = toml::parse_file(directoryPath + switchTableFilePath);
|
||||
toml::table switchToml = toml::parse_file(directoryPath + switchTableFilePath)
|
||||
#if !TOML_EXCEPTIONS
|
||||
.table()
|
||||
#endif
|
||||
;
|
||||
if (auto switchArray = switchToml["switch"].as_array())
|
||||
{
|
||||
for (auto& entry : *switchArray)
|
||||
|
Loading…
x
Reference in New Issue
Block a user