Product load status clang-tidy fixes

This commit is contained in:
Dan Paulat 2025-08-31 00:44:26 -05:00
parent 95b9a03437
commit 22a6ed33c1
2 changed files with 12 additions and 5 deletions

View file

@ -438,9 +438,13 @@ void OverlayLayer::Render(const std::shared_ptr<MapContext>& mapContext,
// Map Center Icon // Map Center Icon
if (params.width != p->lastWidth_ || params.height != p->lastHeight_) if (params.width != p->lastWidth_ || params.height != p->lastHeight_)
{ {
static constexpr double xPosition = 0.5;
static constexpr double yPosition = 0.5;
// Draw the icon in the center of the widget // Draw the icon in the center of the widget
p->icons_->SetIconLocation( p->icons_->SetIconLocation(p->mapCenterIcon_,
p->mapCenterIcon_, params.width / 2.0, params.height / 2.0); params.width * xPosition,
params.height * yPosition);
} }
p->icons_->SetIconVisible(p->mapCenterIcon_, p->icons_->SetIconVisible(p->mapCenterIcon_,
generalSettings.show_map_center().GetValue()); generalSettings.show_map_center().GetValue());
@ -448,10 +452,13 @@ void OverlayLayer::Render(const std::shared_ptr<MapContext>& mapContext,
const QMargins colorTableMargins = mapContext->color_table_margins(); const QMargins colorTableMargins = mapContext->color_table_margins();
if (colorTableMargins != p->lastColorTableMargins_ || p->firstRender_) if (colorTableMargins != p->lastColorTableMargins_ || p->firstRender_)
{ {
static constexpr int xOffset = 10;
static constexpr int yOffset = 10;
// Draw map logo with a 10x10 indent from the bottom left // Draw map logo with a 10x10 indent from the bottom left
p->icons_->SetIconLocation(p->mapLogoIcon_, p->icons_->SetIconLocation(p->mapLogoIcon_,
10 + colorTableMargins.left(), colorTableMargins.left() + xOffset,
10 + colorTableMargins.bottom()); colorTableMargins.bottom() + yOffset);
} }
p->icons_->SetIconVisible(p->mapLogoIcon_, p->icons_->SetIconVisible(p->mapLogoIcon_,
generalSettings.show_map_logo().GetValue()); generalSettings.show_map_logo().GetValue());

View file

@ -303,7 +303,7 @@ void RadarProductLayer::Render(
UpdateSweep(mapContext); UpdateSweep(mapContext);
} }
std::shared_ptr<view::RadarProductView> radarProductView = const std::shared_ptr<view::RadarProductView> radarProductView =
mapContext->radar_product_view(); mapContext->radar_product_view();
bool sweepVisible = false; bool sweepVisible = false;