mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 02:27:42 +00:00
CAutoMapper: Eliminate usages of const_cast
Same behavior, but makes it explicit from the interface that modifications are clearly going on from within the class.
This commit is contained in:
@@ -257,15 +257,16 @@ void CMapArea::CMapAreaSurface::PostConstruct(const u8* buf, std::vector<u32>& i
|
||||
}
|
||||
|
||||
void CMapArea::CMapAreaSurface::Draw(const zeus::CVector3f* verts, const zeus::CColor& surfColor,
|
||||
const zeus::CColor& lineColor, float lineWidth, size_t instIdx) const {
|
||||
const zeus::CColor& lineColor, float lineWidth, size_t instIdx) {
|
||||
if (instIdx >= m_instances.size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Instance& instance = const_cast<Instance&>(m_instances[instIdx]);
|
||||
Instance& instance = m_instances[instIdx];
|
||||
|
||||
if (surfColor.a())
|
||||
if (surfColor.a()) {
|
||||
instance.m_surfacePrims.draw(surfColor, m_primStart, m_primCount);
|
||||
}
|
||||
|
||||
if (lineColor.a()) {
|
||||
bool draw2 = lineWidth > 1.f;
|
||||
|
||||
Reference in New Issue
Block a user