mirror of https://github.com/axmolengine/axmol.git
Fix warnings about signed/unsigned mismatch
This commit is contained in:
parent
16c7a594c8
commit
a3ad4cddf8
|
@ -464,7 +464,7 @@ void Sprite3D::setMaterial(Material *material, int meshIndex)
|
|||
|
||||
if (meshIndex == -1)
|
||||
{
|
||||
for (size_t i = 0; i < _meshes.size(); i++)
|
||||
for (ssize_t i = 0; i < _meshes.size(); i++)
|
||||
{
|
||||
_meshes.at(i)->setMaterial(i == 0 ? material : material->clone());
|
||||
}
|
||||
|
|
|
@ -668,10 +668,10 @@ void WebSocket::onClientWritable()
|
|||
WsMessage* subThreadMsg = *iter;
|
||||
Data* data = (Data*)subThreadMsg->obj;
|
||||
|
||||
const size_t c_bufferSize = WS_RX_BUFFER_SIZE;
|
||||
const ssize_t c_bufferSize = WS_RX_BUFFER_SIZE;
|
||||
|
||||
const size_t remaining = data->len - data->issued;
|
||||
const size_t n = std::min(remaining, c_bufferSize );
|
||||
const ssize_t remaining = data->len - data->issued;
|
||||
const ssize_t n = std::min(remaining, c_bufferSize);
|
||||
|
||||
WebSocketFrame* frame = nullptr;
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ void Physics3DComponent::addToPhysicsWorld(Physics3DWorld* world)
|
|||
{
|
||||
auto parent = _owner->getParent();
|
||||
while (parent) {
|
||||
for (int i = 0; i < components.size(); i++) {
|
||||
for (size_t i = 0; i < components.size(); i++) {
|
||||
if (parent == components[i]->getOwner())
|
||||
{
|
||||
//insert it here
|
||||
|
|
|
@ -1483,7 +1483,7 @@ static int getPrevWord(const std::string& text, int idx)
|
|||
|
||||
static bool isWrappable(const std::string& text)
|
||||
{
|
||||
for (int i=0; i<text.length(); ++i)
|
||||
for (size_t i = 0; i < text.length(); ++i)
|
||||
{
|
||||
if (!std::isalnum(text[i], std::locale()))
|
||||
return true;
|
||||
|
|
|
@ -1034,7 +1034,7 @@ LabelTTFFontsTestNew::LabelTTFFontsTestNew()
|
|||
auto size = Director::getInstance()->getWinSize();
|
||||
TTFConfig ttfConfig(ttfpaths[0],20, GlyphCollection::NEHE);
|
||||
|
||||
for (size_t i = 0; i < fontCount; ++i) {
|
||||
for (int i = 0; i < fontCount; ++i) {
|
||||
ttfConfig.fontFilePath = ttfpaths[i];
|
||||
auto label = Label::createWithTTF(ttfConfig, ttfpaths[i], TextHAlignment::CENTER,0);
|
||||
if( label ) {
|
||||
|
|
|
@ -422,7 +422,7 @@ void Material_parsePerformance::parsingTesting(unsigned int count)
|
|||
{
|
||||
std::clock_t begin = std::clock();
|
||||
|
||||
for(int i=0;i<count;i++)
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
Material::createWithFilename("Materials/2d_effects.material");
|
||||
Material::createWithFilename("Materials/3d_effects.material");
|
||||
|
|
Loading…
Reference in New Issue