aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/units
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/units')
-rw-r--r--src/openvic-simulation/units/Unit.cpp6
-rw-r--r--src/openvic-simulation/units/Unit.hpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/openvic-simulation/units/Unit.cpp b/src/openvic-simulation/units/Unit.cpp
index b965f93..16719e6 100644
--- a/src/openvic-simulation/units/Unit.cpp
+++ b/src/openvic-simulation/units/Unit.cpp
@@ -172,7 +172,7 @@ fixed_point_t NavalUnit::get_torpedo_attack() const {
UnitManager::UnitManager() : units { "units" } {}
-bool UnitManager::_check_shared_parameters(const std::string_view identifier, UNIT_PARAMS) {
+bool UnitManager::_check_shared_parameters(std::string_view identifier, UNIT_PARAMS) {
if (identifier.empty()) {
Logger::error("Invalid religion identifier - empty!");
return false;
@@ -193,7 +193,7 @@ bool UnitManager::_check_shared_parameters(const std::string_view identifier, UN
return true;
}
-bool UnitManager::add_land_unit(const std::string_view identifier, UNIT_PARAMS, LAND_PARAMS) {
+bool UnitManager::add_land_unit(std::string_view identifier, UNIT_PARAMS, LAND_PARAMS) {
if (!_check_shared_parameters(identifier, UNIT_ARGS)) {
return false;
}
@@ -201,7 +201,7 @@ bool UnitManager::add_land_unit(const std::string_view identifier, UNIT_PARAMS,
return units.add_item(LandUnit { identifier, UNIT_ARGS, LAND_ARGS });
}
-bool UnitManager::add_naval_unit(const std::string_view identifier, UNIT_PARAMS, NAVY_PARAMS) {
+bool UnitManager::add_naval_unit(std::string_view identifier, UNIT_PARAMS, NAVY_PARAMS) {
if (!_check_shared_parameters(identifier, UNIT_ARGS)) {
return false;
}
diff --git a/src/openvic-simulation/units/Unit.hpp b/src/openvic-simulation/units/Unit.hpp
index dc7c00f..979ae70 100644
--- a/src/openvic-simulation/units/Unit.hpp
+++ b/src/openvic-simulation/units/Unit.hpp
@@ -147,13 +147,13 @@ namespace OpenVic {
private:
IdentifierRegistry<Unit> units;
- bool _check_shared_parameters(const std::string_view identifier, UNIT_PARAMS);
+ bool _check_shared_parameters(std::string_view identifier, UNIT_PARAMS);
public:
UnitManager();
- bool add_land_unit(const std::string_view identifier, UNIT_PARAMS, LAND_PARAMS);
- bool add_naval_unit(const std::string_view identifier, UNIT_PARAMS, NAVY_PARAMS);
+ bool add_land_unit(std::string_view identifier, UNIT_PARAMS, LAND_PARAMS);
+ bool add_naval_unit(std::string_view identifier, UNIT_PARAMS, NAVY_PARAMS);
IDENTIFIER_REGISTRY_ACCESSORS(Unit, unit)
bool load_unit_file(GoodManager const& good_manager, ast::NodeCPtr root);