mirror of https://github.com/axmolengine/axmol.git
commit
9c7d44ccd7
|
@ -200,8 +200,8 @@ void SpriteFrameCache::addSpriteFramesWithDictionary(ValueMap& dictionary, Textu
|
|||
CCLOGWARN("cocos2d: WARNING: originalWidth/Height not found on the SpriteFrame. AnchorPoint won't work as expected. Regenerate the .plist");
|
||||
}
|
||||
// abs ow/oh
|
||||
ow = abs(ow);
|
||||
oh = abs(oh);
|
||||
ow = std::abs(ow);
|
||||
oh = std::abs(oh);
|
||||
// create frame
|
||||
spriteFrame = SpriteFrame::createWithTexture(texture,
|
||||
Rect(x, y, w, h),
|
||||
|
@ -635,8 +635,8 @@ void SpriteFrameCache::reloadSpriteFramesWithDictionary(ValueMap& dictionary, Te
|
|||
CCLOGWARN("cocos2d: WARNING: originalWidth/Height not found on the SpriteFrame. AnchorPoint won't work as expected. Regenrate the .plist");
|
||||
}
|
||||
// abs ow/oh
|
||||
ow = abs(ow);
|
||||
oh = abs(oh);
|
||||
ow = std::abs(ow);
|
||||
oh = std::abs(oh);
|
||||
// create frame
|
||||
spriteFrame = SpriteFrame::createWithTexture(texture,
|
||||
Rect(x, y, w, h),
|
||||
|
|
|
@ -390,7 +390,7 @@ void TextureAtlas::insertQuadFromIndex(ssize_t oldIndex, ssize_t newIndex)
|
|||
return;
|
||||
}
|
||||
// because it is ambiguous in iphone, so we implement abs ourselves
|
||||
// unsigned int howMany = abs( oldIndex - newIndex);
|
||||
// unsigned int howMany = std::abs( oldIndex - newIndex);
|
||||
auto howMany = (oldIndex - newIndex) > 0 ? (oldIndex - newIndex) : (newIndex - oldIndex);
|
||||
auto dst = oldIndex;
|
||||
auto src = oldIndex + 1;
|
||||
|
|
|
@ -72,7 +72,7 @@ extern int lua_isusertype (lua_State* L, int lo, const char* type);
|
|||
|
||||
bool luaval_is_usertype(lua_State* L,int lo,const char* type, int def)
|
||||
{
|
||||
if (def && lua_gettop(L)<abs(lo))
|
||||
if (def && lua_gettop(L)<std::abs(lo))
|
||||
return true;
|
||||
|
||||
if (lua_isnil(L,lo) || lua_isusertype(L,lo,type))
|
||||
|
|
Loading…
Reference in New Issue