aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation
diff options
context:
space:
mode:
author wvpm <24685035+wvpm@users.noreply.github.com>2024-10-30 22:13:11 +0100
committer wvpm <24685035+wvpm@users.noreply.github.com>2024-10-30 22:19:38 +0100
commit5fe418376e4a53cf77c936ed24bef6d7736260e4 (patch)
treeade1e1d108238b88758e2da654a5ec20b47cf40a /src/openvic-simulation
parent5d8451172fefa93f6f53583fa6b8723f1dd3598e (diff)
Use normal const for fixed_point_tcleanup_const&
Diffstat (limited to 'src/openvic-simulation')
-rw-r--r--src/openvic-simulation/modifier/ModifierValue.cpp4
-rw-r--r--src/openvic-simulation/modifier/ModifierValue.hpp4
-rw-r--r--src/openvic-simulation/pop/Pop.cpp2
-rw-r--r--src/openvic-simulation/pop/Pop.hpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/openvic-simulation/modifier/ModifierValue.cpp b/src/openvic-simulation/modifier/ModifierValue.cpp
index e3e7b0b..4461048 100644
--- a/src/openvic-simulation/modifier/ModifierValue.cpp
+++ b/src/openvic-simulation/modifier/ModifierValue.cpp
@@ -96,14 +96,14 @@ ModifierValue ModifierValue::operator-(ModifierValue const& right) const {
return copy -= right;
}
-ModifierValue& ModifierValue::operator*=(fixed_point_t const& right) {
+ModifierValue& ModifierValue::operator*=(const fixed_point_t right) {
for (auto value : mutable_iterator(values)) {
value.second *= right;
}
return *this;
}
-ModifierValue ModifierValue::operator*(fixed_point_t const& right) const {
+ModifierValue ModifierValue::operator*(const fixed_point_t right) const {
ModifierValue copy = *this;
return copy *= right;
}
diff --git a/src/openvic-simulation/modifier/ModifierValue.hpp b/src/openvic-simulation/modifier/ModifierValue.hpp
index 6e6a29b..f693b7a 100644
--- a/src/openvic-simulation/modifier/ModifierValue.hpp
+++ b/src/openvic-simulation/modifier/ModifierValue.hpp
@@ -37,8 +37,8 @@ namespace OpenVic {
ModifierValue operator-() const;
ModifierValue& operator-=(ModifierValue const& right);
ModifierValue operator-(ModifierValue const& right) const;
- ModifierValue& operator*=(fixed_point_t const& right);
- ModifierValue operator*(fixed_point_t const& right) const;
+ ModifierValue& operator*=(const fixed_point_t right);
+ ModifierValue operator*(const fixed_point_t right) const;
void apply_exclude_targets(ModifierEffect::target_t excluded_targets);
void multiply_add_exclude_targets(
diff --git a/src/openvic-simulation/pop/Pop.cpp b/src/openvic-simulation/pop/Pop.cpp
index 0f0de69..5780450 100644
--- a/src/openvic-simulation/pop/Pop.cpp
+++ b/src/openvic-simulation/pop/Pop.cpp
@@ -141,7 +141,7 @@ void Pop::set_location(ProvinceInstance const& new_location) {
}
void Pop::update_gamestate(
- DefineManager const& define_manager, CountryInstance const* owner, fixed_point_t const& pop_size_per_regiment_multiplier
+ DefineManager const& define_manager, CountryInstance const* owner, const fixed_point_t pop_size_per_regiment_multiplier
) {
if (type->get_can_be_recruited()) {
if (
diff --git a/src/openvic-simulation/pop/Pop.hpp b/src/openvic-simulation/pop/Pop.hpp
index 88c397a..f808740 100644
--- a/src/openvic-simulation/pop/Pop.hpp
+++ b/src/openvic-simulation/pop/Pop.hpp
@@ -101,7 +101,7 @@ namespace OpenVic {
void update_gamestate(
DefineManager const& define_manager, CountryInstance const* owner,
- fixed_point_t const& pop_size_per_regiment_multiplier
+ const fixed_point_t pop_size_per_regiment_multiplier
);
void add_rgo_owner_income(const fixed_point_t income);