improve the code. fix network error

This commit is contained in:
jianglong0156 2015-08-04 16:42:16 +08:00
parent 00b7e98c89
commit 3230ca154d
2 changed files with 2 additions and 4 deletions

View File

@ -183,8 +183,6 @@ long getCharacterCountInUTF8String(const std::string& utf8)
return getUTF8StringLength((const UTF8*)utf8.c_str());
}
} //namespace StringUtils {

View File

@ -585,9 +585,9 @@ private:
std::string strValue = "";
if (!cocos2d::StringUtils::getUTFCharsFromJavaEnv(env, jstr, strValue))
{
ret = strdup(strValue.c_str());
strValue = "";
}
ret = strdup(strValue.c_str());
return ret;
}