mirror of https://github.com/axmolengine/axmol.git
Fix implicit conversion warnings (#17254)
This commit is contained in:
parent
ccf6b99b6d
commit
aa9ce3ccb3
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue