* Fixed warnings in VS2012: C4018 (signed/unsigned mismatch) and C4244 (conversion from 'double' to 'float').

This commit is contained in:
signmotion 2013-11-23 07:23:06 +02:00
parent 4582686860
commit 0d9cd9784b
3 changed files with 4 additions and 3 deletions

View File

@ -301,7 +301,8 @@ void UIListView::removeLastItem()
UIWidget* UIListView::getItem(unsigned int index)
{
if ((int)index < 0 || index >= _items->count())
// @todo Signed/unsigned mishmash. Index is must be unsigned int always. Yes?
if ( ((int)index < 0) || ((int)index >= _items->count()) )
{
return nullptr;
}

View File

@ -367,7 +367,7 @@ void SIOClientImpl::onOpen(WebSocket* ws)
c->onOpen();
}
Director::getInstance()->getScheduler()->scheduleSelector(schedule_selector(SIOClientImpl::heartbeat), this, (_heartbeat * .9), false);
Director::getInstance()->getScheduler()->scheduleSelector(schedule_selector(SIOClientImpl::heartbeat), this, (_heartbeat * .9f), false);
log("SIOClientImpl::onOpen socket connected!");
}

View File

@ -519,7 +519,7 @@ void SpriteMainScene::onEnter()
auto director = Director::getInstance();
auto sched = director->getScheduler();
sched->scheduleSelector(SEL_SCHEDULE(&SpriteMainScene::updateAutoTest), this, 0.2, false);
sched->scheduleSelector(SEL_SCHEDULE(&SpriteMainScene::updateAutoTest), this, 0.2f, false);
}
}