From 90da84a663d756585a42ce87b189dc31119a5097 Mon Sep 17 00:00:00 2001 From: pipu Date: Wed, 11 Mar 2015 09:59:07 +0800 Subject: [PATCH] To modify that check whether or not string is not empty. --- .../cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp index f7d8cdc3cc..6025bea066 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp @@ -602,7 +602,7 @@ namespace cocostudio { button->loadTextureNormal(normalTexturePath, (Widget::TextureResType)normalType); } - else if(normalTexturePath != "") + else if (!normalTexturePath.empty()) { auto label = Label::create(); label->setString(__String::createWithFormat("%s missed", normalErrorFilePath.c_str())->getCString()); @@ -666,7 +666,7 @@ namespace cocostudio { button->loadTexturePressed(pressedTexturePath, (Widget::TextureResType)pressedType); } - else if(pressedTexturePath != "") + else if (!pressedTexturePath.empty()) { auto label = Label::create(); label->setString(__String::createWithFormat("%s missed", pressedErrorFilePath.c_str())->getCString()); @@ -730,7 +730,7 @@ namespace cocostudio { button->loadTextureDisabled(disabledTexturePath, (Widget::TextureResType)disabledType); } - else if(disabledTexturePath != "") + else if (!disabledTexturePath.empty()) { auto label = Label::create(); label->setString(__String::createWithFormat("%s missed", disabledErrorFilePath.c_str())->getCString());