diff options
| author | Léo Lam <leo@leolam.fr> | 2021-11-23 22:56:47 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2021-11-23 22:57:01 +0100 |
| commit | 8ac282db2a1523bc2d1c8b76addccb6927edaa4e (patch) | |
| tree | 68e37849b256fc8bd82c1aa6d77b5e5d2d17dea0 /src | |
| parent | 73e2b740457da3af007c20abdd6c686b6b7c5ad6 (diff) | |
ksys/eco: Clean up casts in Ecosystem::getMapArea
Diffstat (limited to 'src')
| -rw-r--r-- | src/KingSystem/Ecosystem/ecoSystem.cpp | 4 |
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; |
