summaryrefslogtreecommitdiff
path: root/src/KingSystem/Ecosystem/ecoSystem.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-11-23 22:56:47 +0100
committerLéo Lam <leo@leolam.fr>2021-11-23 22:57:01 +0100
commit8ac282db2a1523bc2d1c8b76addccb6927edaa4e (patch)
tree68e37849b256fc8bd82c1aa6d77b5e5d2d17dea0 /src/KingSystem/Ecosystem/ecoSystem.cpp
parent73e2b740457da3af007c20abdd6c686b6b7c5ad6 (diff)
ksys/eco: Clean up casts in Ecosystem::getMapArea
Diffstat (limited to 'src/KingSystem/Ecosystem/ecoSystem.cpp')
-rw-r--r--src/KingSystem/Ecosystem/ecoSystem.cpp4
1 files 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<Segment*>((char*)info.mRows + 2 * val1);
- Segment* segment = reinterpret_cast<Segment*>((char*)info.mRows + 2 * val0);
+ auto* segmentEnd = reinterpret_cast<const Segment*>(info.mRows + 2 * val1);
+ auto* segment = reinterpret_cast<const Segment*>(info.mRows + 2 * val0);
s32 totalLength = 0;
while (true) {
totalLength += segment->length;