From 7fff2bd3c486572916e9af09e86dc436f36421bd Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 23 Jun 2015 15:42:58 +0800 Subject: [PATCH] fix nine patch image parser error on Windows. --- cocos/renderer/CCTexture2D.cpp | 2 +- cocos/ui/UIScale9Sprite.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/renderer/CCTexture2D.cpp b/cocos/renderer/CCTexture2D.cpp index f51b5ae199..634c7c0f1c 100644 --- a/cocos/renderer/CCTexture2D.cpp +++ b/cocos/renderer/CCTexture2D.cpp @@ -1427,7 +1427,7 @@ const Rect& Texture2D::getSpriteFrameCapInset( cocos2d::SpriteFrame *spriteFrame } else { - auto capInsetMap = this->_ninePatchInfo->capInsetMap; + auto &capInsetMap = this->_ninePatchInfo->capInsetMap; if(capInsetMap.find(spriteFrame) != capInsetMap.end()) { return capInsetMap.at(spriteFrame); diff --git a/cocos/ui/UIScale9Sprite.cpp b/cocos/ui/UIScale9Sprite.cpp index 6d0b91aeb1..bc5ad0843e 100644 --- a/cocos/ui/UIScale9Sprite.cpp +++ b/cocos/ui/UIScale9Sprite.cpp @@ -151,7 +151,7 @@ namespace ui { auto spriteFrame = sprite->getSpriteFrame(); if (texture->isContain9PatchInfo()) { - auto parsedCapInset = texture->getSpriteFrameCapInset(spriteFrame); + auto& parsedCapInset = texture->getSpriteFrameCapInset(spriteFrame); if(!parsedCapInset.equals(Rect::ZERO)) { this->_isPatch9 = true;