Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/openvic-simulation/core/error/Error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <cstdint>
#include <string_view>

#include "openvic-simulation/core/Typedefs.hpp"

namespace OpenVic {
enum class Error : uint8_t {
OK, // Being 0 means failure can be checked with "if (Error)"
Expand Down Expand Up @@ -61,5 +63,7 @@ namespace OpenVic {
case BUG: return "Bug";
case MAX: return "";
}

OpenVic::unreachable();
}
}
2 changes: 2 additions & 0 deletions src/openvic-simulation/country/CountryInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ bool CountryInstance::may_build_in(const BuildingRestrictionCategory restriction
case BuildingRestrictionCategory::FACTORY:
return rule_set.may_invest_in_building_factory_abroad();
}

OpenVic::unreachable();
}

CountryRelationManager::relation_value_type CountryInstance::get_relations_with(CountryInstance const& country) const {
Expand Down
7 changes: 6 additions & 1 deletion src/openvic-simulation/misc/GameRulesManager.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "GameRulesManager.hpp"

#include "openvic-simulation/core/Typedefs.hpp"
#include "openvic-simulation/country/CountryInstance.hpp"
#include "openvic-simulation/map/ProvinceDefinition.hpp"
#include "openvic-simulation/map/ProvinceInstance.hpp"
Expand All @@ -24,6 +25,8 @@ bool GameRulesManager::may_use_coastal_artisanal_production_types(ProvinceInstan
case CoastalProvinces:
return is_coastal_province;
}

OpenVic::unreachable();
}

bool GameRulesManager::may_use_coastal_factory_production_types(State const& state) const {
Expand All @@ -40,4 +43,6 @@ bool GameRulesManager::may_use_coastal_factory_production_types(State const& sta
return is_coastal_state;
}
}
}

OpenVic::unreachable();
}
Loading