From af4a407ffef1486483194f7fc251b331b29157f9 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 23 Feb 2005 01:11:02 +0000 Subject: [PATCH] fix VC7 warnings --- stepmania/src/LuaManager.cpp | 4 ++-- stepmania/src/PrefsManager.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/stepmania/src/LuaManager.cpp b/stepmania/src/LuaManager.cpp index 616ba59ec0..4169fbebb8 100644 --- a/stepmania/src/LuaManager.cpp +++ b/stepmania/src/LuaManager.cpp @@ -119,7 +119,7 @@ bool LuaManager::PopStack( bool &out, lua_State *L ) if( L == NULL ) L = LUA->L; - out = lua_toboolean( L, -1 ); + out = !!lua_toboolean( L, -1 ); lua_pop( L, 1 ); return true; } @@ -129,7 +129,7 @@ bool LuaManager::PopStack( float &val, lua_State *L ) if( L == NULL ) L = LUA->L; - val = lua_tonumber( L, -1 ); + val = (float)lua_tonumber( L, -1 ); lua_pop( L, 1 ); return true; } diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index dbb4bdcebe..bb2cdeac16 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -838,7 +838,10 @@ public: lua_pushnil( L ); } else + { pPref->PushValue( L ); + } + return 1; } static int SetPreference( T* p, lua_State *L ) {