Skip to content

Commit

Permalink
add const for set unit callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
AdenKoperczak committed Dec 13, 2024
1 parent a556921 commit 7b1b56e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scwx-qt/source/scwx/qt/ui/settings_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,10 +754,10 @@ void SettingsDialogImpl::SetupGeneralTab()
radarSiteThreshold_.SetUnitLabel(self_->ui->radarSiteThresholdUnitLabel);
auto radarSiteThresholdUpdateUnits = [this](const std::string& newValue)
{
types::DistanceUnits radiusUnits =
const types::DistanceUnits radiusUnits =
types::GetDistanceUnitsFromName(newValue);
double radiusScale = types::GetDistanceUnitsScale(radiusUnits);
std::string abbreviation =
const double radiusScale = types::GetDistanceUnitsScale(radiusUnits);
const std::string abbreviation =
types::GetDistanceUnitsAbbreviation(radiusUnits);

radarSiteThreshold_.SetUnit(radiusScale, abbreviation);
Expand Down Expand Up @@ -1073,10 +1073,10 @@ void SettingsDialogImpl::SetupAudioTab()
alertAudioRadius_.SetUnitLabel(self_->ui->alertAudioRadiusUnitsLabel);
auto alertAudioRadiusUpdateUnits = [this](const std::string& newValue)
{
types::DistanceUnits radiusUnits =
const types::DistanceUnits radiusUnits =
types::GetDistanceUnitsFromName(newValue);
double radiusScale = types::GetDistanceUnitsScale(radiusUnits);
std::string abbreviation =
const double radiusScale = types::GetDistanceUnitsScale(radiusUnits);
const std::string abbreviation =
types::GetDistanceUnitsAbbreviation(radiusUnits);

alertAudioRadius_.SetUnit(radiusScale, abbreviation);
Expand Down

0 comments on commit 7b1b56e

Please sign in to comment.