CTextRenderBuffer: Remove use of const_cast within Render()

Same behavior but way less casting.
This commit is contained in:
Lioncash 2020-03-29 04:36:52 -04:00
parent 3e07a06355
commit 0aff4dc21e
2 changed files with 3 additions and 3 deletions

View File

@ -186,8 +186,8 @@ void CGuiTextSupport::AutoSetExtent() {
x38_extentY = bounds.second.y; x38_extentY = bounds.second.y;
} }
void CGuiTextSupport::Render() const { void CGuiTextSupport::Render() {
const_cast<CGuiTextSupport*>(this)->CheckAndRebuildRenderBuffer(); CheckAndRebuildRenderBuffer();
if (CTextRenderBuffer* buf = GetCurrentPageRenderBuffer()) { if (CTextRenderBuffer* buf = GetCurrentPageRenderBuffer()) {
SCOPED_GRAPHICS_DEBUG_GROUP("CGuiTextSupport::Draw", zeus::skBlue); SCOPED_GRAPHICS_DEBUG_GROUP("CGuiTextSupport::Draw", zeus::skBlue);
zeus::CTransform oldModel = CGraphics::g_GXModelMatrix; zeus::CTransform oldModel = CGraphics::g_GXModelMatrix;

View File

@ -104,7 +104,7 @@ public:
const std::pair<zeus::CVector2i, zeus::CVector2i>& GetBounds(); const std::pair<zeus::CVector2i, zeus::CVector2i>& GetBounds();
void AutoSetExtent(); void AutoSetExtent();
void Render() const; void Render();
void SetGeometryColor(const zeus::CColor& col); void SetGeometryColor(const zeus::CColor& col);
void SetOutlineColor(const zeus::CColor& col); void SetOutlineColor(const zeus::CColor& col);
void SetFontColor(const zeus::CColor& col); void SetFontColor(const zeus::CColor& col);