From e154e654f1e046a4d60e09d3ef87d1cf9c3ae6ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Mon, 13 Aug 2012 01:26:36 +0200 Subject: Reduced amount of warnings in CBot library Changed most of C-style casting to C++ casting Commented unused variables --- src/CBot/CBotProgram.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/CBot/CBotProgram.cpp') diff --git a/src/CBot/CBotProgram.cpp b/src/CBot/CBotProgram.cpp index 4ffd6af..f4987a7 100644 --- a/src/CBot/CBotProgram.cpp +++ b/src/CBot/CBotProgram.cpp @@ -487,7 +487,7 @@ bool ReadType(FILE* pf, CBotTypResult& type) if ( !ReadWord(pf, ww) ) return false; if ( !ReadType(pf, r) ) return false; type = CBotTypResult( w, r ); - type.SetLimite((short)ww); + type.SetLimite(static_cast(ww)); } return true; } @@ -625,7 +625,7 @@ CBotVar* MakeListVars(CBotVar** ppVars, bool bSetVal=false) while( true ) { - ppVars[i]; +// ppVars[i]; if ( ppVars[i] == NULL ) break; CBotVar* pp = CBotVar::Create(ppVars[i]); @@ -781,7 +781,7 @@ fund: // lists the parameters depending on the contents of the stack (pStackVar) CBotVar* pVar = MakeListVars(ppVar, true); - CBotVar* pVarToDelete = pVar; +// CBotVar* pVarToDelete = pVar; // creates a variable to the result CBotVar* pResult = rettype.Eq(0) ? NULL : CBotVar::Create("", rettype); @@ -815,7 +815,8 @@ bool CBotCall::RestoreCall(long& nIdent, CBotToken* token, CBotVar** ppVar, CBot CBotStack* pile = pStack->RestoreStackEOX(pt); if ( pile == NULL ) return true; - CBotStack* pile2 = pile->RestoreStack(); + // CBotStack* pile2 = pile->RestoreStack(); + pile->RestoreStack(); return true; } pt = pt->m_next; -- cgit v1.2.3-1-g7c22