diff --git a/cocos/gui/UIListView.cpp b/cocos/gui/UIListView.cpp index 8e45662c3e..dbc2a1f840 100644 --- a/cocos/gui/UIListView.cpp +++ b/cocos/gui/UIListView.cpp @@ -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; } diff --git a/cocos/network/SocketIO.cpp b/cocos/network/SocketIO.cpp index bb9acff3e1..d4d66ac137 100644 --- a/cocos/network/SocketIO.cpp +++ b/cocos/network/SocketIO.cpp @@ -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!"); } diff --git a/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceSpriteTest.cpp b/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceSpriteTest.cpp index ccf4ca602d..fd7fd7e042 100644 --- a/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceSpriteTest.cpp +++ b/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceSpriteTest.cpp @@ -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); } }