From 8ac282db2a1523bc2d1c8b76addccb6927edaa4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Tue, 23 Nov 2021 22:56:47 +0100 Subject: [PATCH] ksys/eco: Clean up casts in Ecosystem::getMapArea --- src/KingSystem/Ecosystem/ecoSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/KingSystem/Ecosystem/ecoSystem.cpp b/src/KingSystem/Ecosystem/ecoSystem.cpp index 0e6fded4..fd08443c 100644 --- a/src/KingSystem/Ecosystem/ecoSystem.cpp +++ b/src/KingSystem/Ecosystem/ecoSystem.cpp @@ -119,8 +119,8 @@ s32 Ecosystem::getMapArea(const EcoMapInfo& info, f32 posX, f32 posZ) const { if (val0 >= val1) return -1; - Segment* segmentEnd = reinterpret_cast((char*)info.mRows + 2 * val1); - Segment* segment = reinterpret_cast((char*)info.mRows + 2 * val0); + auto* segmentEnd = reinterpret_cast(info.mRows + 2 * val1); + auto* segment = reinterpret_cast(info.mRows + 2 * val0); s32 totalLength = 0; while (true) { totalLength += segment->length;