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/CBotWhile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/CBot/CBotWhile.cpp') diff --git a/src/CBot/CBotWhile.cpp b/src/CBot/CBotWhile.cpp index 8a0cc64..dfd69bf 100644 --- a/src/CBot/CBotWhile.cpp +++ b/src/CBot/CBotWhile.cpp @@ -1132,7 +1132,7 @@ bool CBotTry :: Execute(CBotStack* &pj) // see what it returns CBotCatch* pc = m_ListCatch; - int state = (short)pile1->GetState(); // where were we? + int state = static_cast(pile1->GetState()); // where were we? val = pile2->GetState(); // what error? pile0->SetState(1); // marking the GetRunPos @@ -1315,7 +1315,7 @@ bool CBotCatch :: TestCatch(CBotStack* &pile, int val) if ( val > 0 || pile->GetType() != CBotTypBoolean ) { - CBotVar* var = CBotVar::Create((CBotToken*)NULL, CBotTypBoolean); + CBotVar* var = CBotVar::Create(static_cast(NULL), CBotTypBoolean); var->SetValInt( pile->GetVal() == val ); pile->SetVar(var); // calls on the stack } -- cgit v1.2.3-1-g7c22