ksys/eco: Clean up casts in Ecosystem::getMapArea

This commit is contained in:
Léo Lam 2021-11-23 22:56:47 +01:00
parent 73e2b74045
commit 8ac282db2a
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
1 changed files with 2 additions and 2 deletions

View File

@ -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;