From 423328de708ffa93961c329de13445ce2da6e328 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 1 Jan 2024 22:03:10 +0000 Subject: Remove more use of legacy types and unnecessary pointers from selectable interface --- ui/gameMainSelector.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ui') diff --git a/ui/gameMainSelector.cpp b/ui/gameMainSelector.cpp index a451ee1..703cfab 100644 --- a/ui/gameMainSelector.cpp +++ b/ui/gameMainSelector.cpp @@ -73,11 +73,10 @@ GameMainSelector::handleInput(const SDL_Event & e, const Position & parentPos) void GameMainSelector::defaultClick(const Ray & ray) { - Position2D baryPos {}; - float distance {}; + BaryPosition baryPos {}; + RelativeDistance distance {}; - if (const auto selected - = gameState->world.applyOne(&Selectable::intersectRay, ray, &baryPos, &distance); + if (const auto selected = gameState->world.applyOne(&Selectable::intersectRay, ray, baryPos, distance); selected != gameState->world.end()) { const auto & ref = *selected.base()->get(); clicked = typeid(ref).name(); -- cgit v1.2.3