Make GetValueFromMap static. Also hush bogus warning about possible uninitialized use of iPage.

This commit is contained in:
Steve Checkoway
2008-07-28 04:15:55 +00:00
parent 87b4e72bc2
commit d563a5f640
+2 -2
View File
@@ -353,7 +353,7 @@ void ScreenDebugOverlay::UpdateText()
} }
template<typename U, typename V> template<typename U, typename V>
bool GetValueFromMap( const map<U, V> &m, const U &key, V &val ) static bool GetValueFromMap( const map<U, V> &m, const U &key, V &val )
{ {
typename map<U, V>::const_iterator it = m.find(key); typename map<U, V>::const_iterator it = m.find(key);
if( it == m.end() ) if( it == m.end() )
@@ -382,7 +382,7 @@ bool ScreenDebugOverlay::OverlayInput( const InputEventPlus &input )
g_bIsDisplayed = false; g_bIsDisplayed = false;
} }
int iPage; int iPage = 0;
if( g_bIsDisplayed && GetValueFromMap(g_Mappings.pageButton, input.DeviceI, iPage) ) if( g_bIsDisplayed && GetValueFromMap(g_Mappings.pageButton, input.DeviceI, iPage) )
{ {
if( input.type != IET_FIRST_PRESS ) if( input.type != IET_FIRST_PRESS )