Fix implicit conversion warnings (#17254)

This commit is contained in:
mogemimi 2017-02-04 11:38:22 +09:00 committed by minggo
parent ccf6b99b6d
commit aa9ce3ccb3
4 changed files with 8 additions and 8 deletions

View File

@ -271,9 +271,9 @@ void ParticleBatchNode::reorderChild(Node * aChild, int zOrder)
// Find new AtlasIndex
int newAtlasIndex = 0;
for(int i=0, size = _children.size(); i < size; ++i)
for (const auto& iter : _children)
{
ParticleSystem* node = static_cast<ParticleSystem*>(_children.at(i));
auto node = static_cast<ParticleSystem*>(iter);
if( node == child )
{
newAtlasIndex = child->getAtlasIndex();

View File

@ -89,9 +89,9 @@ Bone3D* MeshSkin::getBoneByName(const std::string& id) const
int MeshSkin::getBoneIndex(Bone3D* bone) const
{
for (int i = 0, size = _skinBones.size(); i < size; ++i) {
for (ssize_t i = 0, size = _skinBones.size(); i < size; ++i) {
if (_skinBones.at(i) == bone)
return i;
return static_cast<int>(i);
}
return -1;

View File

@ -303,9 +303,9 @@ Bone3D* Skeleton3D::getRootBone(int index) const
int Skeleton3D::getBoneIndex(Bone3D* bone) const
{
for (int i = 0, size = _bones.size(); i < size; ++i) {
for (ssize_t i = 0, size = _bones.size(); i < size; ++i) {
if (_bones.at(i) == bone)
return i;
return static_cast<int>(i);
}
return -1;

View File

@ -463,9 +463,9 @@ void SIOClientImpl::handshakeResponse(HttpClient* /*sender*/, HttpResponse *resp
std::stringstream s;
s.str("");
for (unsigned int i = 0, size = buffer->size(); i < size; ++i)
for (const auto& iter : *buffer)
{
s << (*buffer)[i];
s << iter;
}
CCLOGINFO("SIOClientImpl::handshake() dump data: %s", s.str().c_str());