CMapWorldInfo: Resolve sign conversion warnings

Resolves trivial implicit sign conversion warnings.
This commit is contained in:
Lioncash 2020-03-13 16:10:20 -04:00
parent 4601abf5df
commit 014601cf67
1 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ void CMapWorldInfo::SetDoorVisited(TEditorId eid, bool visited) { x28_visitedDoo
bool CMapWorldInfo::IsDoorVisited(TEditorId eid) const { return x28_visitedDoors.find(eid) != x28_visitedDoors.end(); }
bool CMapWorldInfo::IsAreaVisted(TAreaId aid) const {
if (aid + 1 > x0_visitedAreasAllocated) {
if (u32(aid) + 1 > x0_visitedAreasAllocated) {
const_cast<CMapWorldInfo&>(*this).x4_visitedAreas.resize((aid + 32) / 32);
const_cast<CMapWorldInfo&>(*this).x0_visitedAreasAllocated = aid + 1;
}
@ -62,7 +62,7 @@ bool CMapWorldInfo::IsAreaVisted(TAreaId aid) const {
}
void CMapWorldInfo::SetAreaVisited(TAreaId aid, bool visited) {
if (aid + 1 > x0_visitedAreasAllocated) {
if (u32(aid) + 1 > x0_visitedAreasAllocated) {
x4_visitedAreas.resize((aid + 32) / 32);
x0_visitedAreasAllocated = aid + 1;
}
@ -73,7 +73,7 @@ void CMapWorldInfo::SetAreaVisited(TAreaId aid, bool visited) {
}
bool CMapWorldInfo::IsMapped(TAreaId aid) const {
if (aid + 1 > x14_mappedAreasAllocated) {
if (u32(aid) + 1 > x14_mappedAreasAllocated) {
const_cast<CMapWorldInfo&>(*this).x18_mappedAreas.resize((aid + 32) / 32);
const_cast<CMapWorldInfo&>(*this).x14_mappedAreasAllocated = aid + 1;
}
@ -81,7 +81,7 @@ bool CMapWorldInfo::IsMapped(TAreaId aid) const {
}
void CMapWorldInfo::SetIsMapped(TAreaId aid, bool mapped) {
if (aid + 1 > x14_mappedAreasAllocated) {
if (u32(aid) + 1 > x14_mappedAreasAllocated) {
x18_mappedAreas.resize((aid + 32) / 32);
x14_mappedAreasAllocated = aid + 1;
}