remove unneeded assignment (#17320)

This commit is contained in:
minggo 2017-02-08 13:58:11 +08:00 committed by GitHub
parent e80f4bb9f6
commit 92704517bc
6 changed files with 5 additions and 15 deletions

View File

@ -43,10 +43,7 @@ AudioEngineImpl::~AudioEngineImpl()
bool AudioEngineImpl::init()
{
bool ret = false;
ret = true;
return ret;
return true;
}
AudioCache* AudioEngineImpl::preload(const std::string& filePath, std::function<void(bool)> callback)

View File

@ -82,13 +82,12 @@ bool __String::initWithFormatAndValist(const char* format, va_list ap)
bool __String::initWithFormat(const char* format, ...)
{
bool bRet = false;
_string.clear();
va_list ap;
va_start(ap, format);
bRet = initWithFormatAndValist(format, ap);
bool bRet = initWithFormatAndValist(format, ap);
va_end(ap);

View File

@ -964,12 +964,10 @@ ActionTimeline* ActionTimelineCache::createActionWithFlatBuffersForSimulator(con
fbs->_isSimulator = true;
auto builder = fbs->createFlatBuffersWithXMLFileForSimulator(fileName);
ActionTimeline* action = ActionTimeline::create();
auto csparsebinary = GetCSParseBinary(builder->GetBufferPointer());
auto nodeAction = csparsebinary->action();
action = ActionTimeline::create();
auto action = ActionTimeline::create();
int duration = nodeAction->duration();
action->setDuration(duration);

View File

@ -329,11 +329,9 @@ Node* CSLoader::createNodeWithVisibleSize(const std::string &filename, const ccN
std::string CSLoader::getExtentionName(const std::string& name)
{
std::string result = "";
std::string path = name;
size_t pos = path.find_last_of('.');
result = path.substr(pos + 1, path.length());
std::string result = path.substr(pos + 1, path.length());
return result;
}

View File

@ -493,7 +493,6 @@ void SIOClientImpl::handshakeResponse(HttpClient* /*sender*/, HttpResponse *resp
temp = temp.erase(0, b + 1);
// chomp past the upgrades
a = temp.find(":");
b = temp.find(",");
temp = temp.erase(0, b + 1);

View File

@ -910,9 +910,8 @@ bool Image::encodeWithWIC(const std::string& filePath, bool isToRGB, GUID contai
std::swap(pSaveData[ind - 2], pSaveData[ind]);
}
bool bRet = false;
WICImageLoader img;
bRet = img.encodeImageData(filePath, pSaveData, saveLen, targetFormat, _width, _height, containerFormat);
bool bRet = img.encodeImageData(filePath, pSaveData, saveLen, targetFormat, _width, _height, containerFormat);
delete[] pSaveData;
return bRet;