Skip to content

Commit 9bc101f

Browse files
double const
Signed-off-by: Peter Salemink <[email protected]>
1 parent 347fdc1 commit 9bc101f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/power_grid_model/component/load_gen.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class LoadGen final : public std::conditional_t<is_gen, GenericGenerator, Generi
7878
}
7979

8080
void set_power(RealValue<sym> const& new_p_specified, RealValue<sym> const& new_q_specified) {
81-
double scalar = direction_ / base_power<sym>;
81+
double const scalar = direction_ / base_power<sym>;
8282
RealValue<sym> ps = real(s_specified_);
8383
RealValue<sym> qs = imag(s_specified_);
8484
update_real_value<sym>(new_p_specified, ps, scalar);

include/power_grid_model/component/power_sensor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class PowerSensor : public GenericPowerSensor {
7777
{};
7878

7979
UpdateChange update(PowerSensorUpdate<sym> const& power_sensor_update) {
80-
double scalar = convert_direction() / base_power<sym>;
80+
double const scalar = convert_direction() / base_power<sym>;
8181
RealValue<sym> ps = real(s_measured_);
8282
RealValue<sym> qs = imag(s_measured_);
8383
update_real_value<sym>(power_sensor_update.p_measured, ps, scalar);

include/power_grid_model/component/voltage_sensor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class VoltageSensor : public GenericVoltageSensor {
7070
u_angle_measured_{voltage_sensor_input.u_angle_measured} {};
7171

7272
UpdateChange update(VoltageSensorUpdate<sym> const& voltage_sensor_update) {
73-
double scalar = 1 / (u_rated_ * u_scale<sym>);
73+
double const scalar = 1 / (u_rated_ * u_scale<sym>);
7474
RealValue<sym> u = u_measured_;
7575
RealValue<sym> u_angle = u_angle_measured_;
7676
update_real_value<sym>(voltage_sensor_update.u_measured, u, scalar);

0 commit comments

Comments
 (0)