From 9a5468ceb4361059fcefae1a383a7c29b4f4e7be Mon Sep 17 00:00:00 2001 From: hop311 Date: Sun, 27 Oct 2024 11:56:46 +0000 Subject: Rename `scope_t` enum to `scope_type_t` --- src/openvic-simulation/misc/SongChance.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/openvic-simulation/misc/SongChance.cpp') diff --git a/src/openvic-simulation/misc/SongChance.cpp b/src/openvic-simulation/misc/SongChance.cpp index 94fb571..d05afdf 100644 --- a/src/openvic-simulation/misc/SongChance.cpp +++ b/src/openvic-simulation/misc/SongChance.cpp @@ -17,12 +17,14 @@ bool SongChanceManager::load_songs_file(ast::NodeCPtr root) { ret &= expect_dictionary_reserve_length( song_chances, [this](std::string_view key, ast::NodeCPtr value) -> bool { + using enum scope_type_t; + if (key != "song") { Logger::error("Invalid song declaration ", key); return false; } std::string_view name {}; - ConditionalWeight chance { scope_t::COUNTRY, scope_t::COUNTRY, scope_t::NO_SCOPE }; + ConditionalWeight chance { COUNTRY, COUNTRY, NO_SCOPE }; bool ret = expect_dictionary_keys( "name", ONE_EXACTLY, expect_string(assign_variable_callback(name)), -- cgit v1.2.3-56-ga3b1