CMapArea: Resolve sign conversion warning in Draw()

Resolves a trivial sign-conversion warning.
This commit is contained in:
Lioncash 2020-03-13 16:07:39 -04:00
parent df4487bae8
commit 4601abf5df
3 changed files with 5 additions and 4 deletions

View File

@ -246,9 +246,10 @@ void CMapArea::CMapAreaSurface::PostConstruct(const u8* buf, std::vector<u32>& i
} }
void CMapArea::CMapAreaSurface::Draw(const zeus::CVector3f* verts, const zeus::CColor& surfColor, void CMapArea::CMapAreaSurface::Draw(const zeus::CVector3f* verts, const zeus::CColor& surfColor,
const zeus::CColor& lineColor, float lineWidth, int instIdx) const { const zeus::CColor& lineColor, float lineWidth, size_t instIdx) const {
if (instIdx >= m_instances.size()) if (instIdx >= m_instances.size()) {
return; return;
}
Instance& instance = const_cast<Instance&>(m_instances[instIdx]); Instance& instance = const_cast<Instance&>(m_instances[instIdx]);

View File

@ -42,7 +42,7 @@ public:
CMapAreaSurface(CMapAreaSurface&&) = default; CMapAreaSurface(CMapAreaSurface&&) = default;
void PostConstruct(const u8* buf, std::vector<u32>& index); void PostConstruct(const u8* buf, std::vector<u32>& index);
void Draw(const zeus::CVector3f* verts, const zeus::CColor& surfColor, const zeus::CColor& lineColor, void Draw(const zeus::CVector3f* verts, const zeus::CColor& surfColor, const zeus::CColor& lineColor,
float lineWidth, int instIdx = 0) const; float lineWidth, size_t instIdx = 0) const;
const zeus::CVector3f& GetNormal() const { return x0_normal; } const zeus::CVector3f& GetNormal() const { return x0_normal; }
const zeus::CVector3f& GetCenterPosition() const { return xc_centroid; } const zeus::CVector3f& GetCenterPosition() const { return xc_centroid; }
}; };

View File

@ -85,7 +85,7 @@ void CMapUniverse::Draw(const CMapUniverseDrawParms& parms, const zeus::CVector3
int lastWldIdx = -1; int lastWldIdx = -1;
int lastHexIdx = -1; int lastHexIdx = -1;
int instIdx = 0; size_t instIdx = 0;
for (const CMapObjectSortInfo& info : sortInfos) { for (const CMapObjectSortInfo& info : sortInfos) {
const CMapWorldData& mwData = x10_worldDatas[info.GetWorldIndex()]; const CMapWorldData& mwData = x10_worldDatas[info.GetWorldIndex()];
zeus::CColor surfColor = info.GetSurfaceColor(); zeus::CColor surfColor = info.GetSurfaceColor();