aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/modifier
diff options
context:
space:
mode:
author wvpm <24685035+wvpm@users.noreply.github.com>2024-10-30 22:39:59 +0100
committer GitHub <noreply@github.com>2024-10-30 22:39:59 +0100
commitc763a0aedd834432b54b6e49c6bc7e1936be1131 (patch)
treeade1e1d108238b88758e2da654a5ec20b47cf40a /src/openvic-simulation/modifier
parent5d8451172fefa93f6f53583fa6b8723f1dd3598e (diff)
parent5fe418376e4a53cf77c936ed24bef6d7736260e4 (diff)
Merge pull request #220 from OpenVicProject/cleanup_const&
Use normal const for fixed_point_t
Diffstat (limited to 'src/openvic-simulation/modifier')
-rw-r--r--src/openvic-simulation/modifier/ModifierValue.cpp4
-rw-r--r--src/openvic-simulation/modifier/ModifierValue.hpp4
2 files changed, 4 insertions, 4 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(