Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Pentarctagon committed Jun 21, 2024
1 parent 1a1f362 commit 0ab51c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/preferences/preferences.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ class prefs
{
// for wesnoth: checks that the userdata folders have been initialized/found since if it hasn't been then it's too soon to be getting any values from it
// for boost: the userdata folders don't get initialized and the preferences aren't used for anything, so skip the check here
// TODO: figure out how to make this not fail for all the other tests too
static bool called_before_init = !(filesystem::base_name(filesystem::get_exe_path()).find("boost") == std::string::npos && !filesystem::is_userdata_initialized());
// macos - called "unit_tests"
// others - called "boost_unit_tests"
static bool called_before_init = !(filesystem::base_name(filesystem::get_exe_path()).find("unit_tests") == std::string::npos && !filesystem::is_userdata_initialized());
assert(called_before_init && "Attempt to use preferences before userdata initialization");

static prefs prefs_manager;
Expand Down

0 comments on commit 0ab51c8

Please sign in to comment.