From 4c08a0705235e124ea23267d29342d01440af4c8 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Fri, 15 Apr 2005 22:40:15 +0000 Subject: [PATCH] Fixed warnings and bug. Updated binaries. This was SVN commit r2136. --- source/gui/CList.cpp | 8 ++++---- source/simulation/BaseEntity.cpp | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/gui/CList.cpp b/source/gui/CList.cpp index 2c4e8f7af4..a2e0957e73 100644 --- a/source/gui/CList.cpp +++ b/source/gui/CList.cpp @@ -86,7 +86,7 @@ void CList::SetupText() // Generate texts float buffered_y = 0.f; - for (int i=0; i= m_CachedActualSize.top + m_ItemsYPositions[i] && mouse.y < m_CachedActualSize.top + m_ItemsYPositions[i+1] && @@ -328,7 +328,7 @@ void CList::Draw() CColor color; GUI::GetSetting(this, "textcolor", color); - for (int i=0; i m_CachedActualSize.GetHeight()) @@ -404,7 +404,7 @@ void CList::SelectLastElement() if (selected != m_Items.size()-1) { - GUI::SetSetting(this, "selected", m_Items.size()-1); + GUI::SetSetting(this, "selected", (int)m_Items.size()-1); } } diff --git a/source/simulation/BaseEntity.cpp b/source/simulation/BaseEntity.cpp index 2366c51231..05297a53ca 100755 --- a/source/simulation/BaseEntity.cpp +++ b/source/simulation/BaseEntity.cpp @@ -173,7 +173,8 @@ bool CBaseEntity::loadXML( CStr filename ) if( ExternalFunction != CStrW() ) { jsval fnval; - assert( JS_TRUE == JS_GetUCProperty( g_ScriptingHost.GetContext(), g_ScriptingHost.GetGlobalObject(), ExternalFunction.c_str(), ExternalFunction.Length(), &fnval ) ); + JSBool ret = JS_GetUCProperty( g_ScriptingHost.GetContext(), g_ScriptingHost.GetGlobalObject(), ExternalFunction.c_str(), ExternalFunction.Length(), &fnval ); + assert( ret ); JSFunction* fn = JS_ValueToFunction( g_ScriptingHost.GetContext(), fnval ); if( !fn ) {