To modify that check whether or not string is not empty.

This commit is contained in:
pipu 2015-03-11 09:59:07 +08:00
parent 00bf9f5bfb
commit 90da84a663
1 changed files with 3 additions and 3 deletions

View File

@ -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());