summaryrefslogtreecommitdiffstats
path: root/src/CBot/CBotWhile.cpp
diff options
context:
space:
mode:
authorMichał Konopacki <konopacki.m@gmail.com>2012-08-13 01:26:36 +0200
committerMichał Konopacki <konopacki.m@gmail.com>2012-08-13 01:45:35 +0200
commite154e654f1e046a4d60e09d3ef87d1cf9c3ae6ae (patch)
tree049a2382a5bc8a611fe0ad3df25025eeb7293278 /src/CBot/CBotWhile.cpp
parenta9186d19609c61c369d881cdbc40cc8973cf883d (diff)
downloadcolobot-e154e654f1e046a4d60e09d3ef87d1cf9c3ae6ae.tar.gz
colobot-e154e654f1e046a4d60e09d3ef87d1cf9c3ae6ae.tar.bz2
colobot-e154e654f1e046a4d60e09d3ef87d1cf9c3ae6ae.zip
Reduced amount of warnings in CBot library
Changed most of C-style casting to C++ casting Commented unused variables
Diffstat (limited to 'src/CBot/CBotWhile.cpp')
-rw-r--r--src/CBot/CBotWhile.cpp4
1 files changed, 2 insertions, 2 deletions
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<short>(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<CBotToken*>(NULL), CBotTypBoolean);
var->SetValInt( pile->GetVal() == val );
pile->SetVar(var); // calls on the stack
}