From 8a1d137d0558ec39e3434764179ff8ea1ddd7a9b Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Thu, 2 May 2013 21:44:51 -0400 Subject: [PATCH] Revert "Now I can apply const appropriately." This reverts commit 15e9e1d1d4b2f0daad65eb91757d0455728e93f6. --- src/ScreenDebugOverlay.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ScreenDebugOverlay.cpp b/src/ScreenDebugOverlay.cpp index 87586a152f..4542e5c4af 100644 --- a/src/ScreenDebugOverlay.cpp +++ b/src/ScreenDebugOverlay.cpp @@ -359,16 +359,16 @@ void ScreenDebugOverlay::UpdateText() // todo: allow changing of various spacing/location things -aj int iOffset = 0; - int i = 0; - for (IDebugLine const *p : *g_pvpSubscribers) + FOREACH_CONST( IDebugLine*, *g_pvpSubscribers, p ) { - RString sPageName = p->GetPageName(); + RString sPageName = (*p)->GetPageName(); + + int i = p-g_pvpSubscribers->begin(); float fY = LINE_START_Y + iOffset * LINE_SPACING; BitmapText &txt1 = *m_vptextButton[i]; BitmapText &txt2 = *m_vptextFunction[i]; - ++i; if( sPageName != GetCurrentPageName() ) { txt1.SetVisible( false ); @@ -385,15 +385,15 @@ void ScreenDebugOverlay::UpdateText() txt2.SetX( LINE_FUNCTION_X ); txt2.SetY( fY ); - RString s1 = p->GetDisplayTitle(); - RString s2 = p->GetDisplayValue(); + RString s1 = (*p)->GetDisplayTitle(); + RString s2 = (*p)->GetDisplayValue(); - bool bOn = p->IsEnabled(); + bool bOn = (*p)->IsEnabled(); txt1.SetDiffuse( bOn ? LINE_ON_COLOR:LINE_OFF_COLOR ); txt2.SetDiffuse( bOn ? LINE_ON_COLOR:LINE_OFF_COLOR ); - RString sButton = GetDebugButtonName( p ); + RString sButton = GetDebugButtonName( *p ); if( !sButton.empty() ) sButton += ": "; txt1.SetText( sButton );