mirror of https://github.com/axmolengine/axmol.git
remove unneeded assignment (#17320)
This commit is contained in:
parent
e80f4bb9f6
commit
92704517bc
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue