mirror of https://github.com/axmolengine/axmol.git
Remove unnecessary std::move semantics
This commit is contained in:
parent
a558bc2198
commit
f91ed91688
|
@ -43,8 +43,8 @@ ProgramGL::ProgramGL(const std::string& vertexShader, const std::string& fragmen
|
||||||
{
|
{
|
||||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||||
// some device required manually specify the precision qualifiers for vertex shader.
|
// some device required manually specify the precision qualifiers for vertex shader.
|
||||||
_vertexShaderModule = static_cast<ShaderModuleGL*>(ShaderCache::newVertexShaderModule(std::move(SHADER_PREDEFINE + _vertexShader)));
|
_vertexShaderModule = static_cast<ShaderModuleGL*>(ShaderCache::newVertexShaderModule(SHADER_PREDEFINE + _vertexShader));
|
||||||
_fragmentShaderModule = static_cast<ShaderModuleGL*>(ShaderCache::newFragmentShaderModule(std::move(SHADER_PREDEFINE + _fragmentShader)));
|
_fragmentShaderModule = static_cast<ShaderModuleGL*>(ShaderCache::newFragmentShaderModule(SHADER_PREDEFINE + _fragmentShader));
|
||||||
#else
|
#else
|
||||||
_vertexShaderModule = static_cast<ShaderModuleGL*>(ShaderCache::newVertexShaderModule(_vertexShader));
|
_vertexShaderModule = static_cast<ShaderModuleGL*>(ShaderCache::newVertexShaderModule(_vertexShader));
|
||||||
_fragmentShaderModule = static_cast<ShaderModuleGL*>(ShaderCache::newFragmentShaderModule(_fragmentShader));
|
_fragmentShaderModule = static_cast<ShaderModuleGL*>(ShaderCache::newFragmentShaderModule(_fragmentShader));
|
||||||
|
@ -89,8 +89,8 @@ void ProgramGL::reloadProgram()
|
||||||
_activeUniformInfos.clear();
|
_activeUniformInfos.clear();
|
||||||
_mapToCurrentActiveLocation.clear();
|
_mapToCurrentActiveLocation.clear();
|
||||||
_mapToOriginalLocation.clear();
|
_mapToOriginalLocation.clear();
|
||||||
static_cast<ShaderModuleGL*>(_vertexShaderModule)->compileShader(backend::ShaderStage::VERTEX, std::move(SHADER_PREDEFINE + _vertexShader));
|
static_cast<ShaderModuleGL*>(_vertexShaderModule)->compileShader(backend::ShaderStage::VERTEX, SHADER_PREDEFINE + _vertexShader);
|
||||||
static_cast<ShaderModuleGL*>(_fragmentShaderModule)->compileShader(backend::ShaderStage::FRAGMENT, std::move(SHADER_PREDEFINE + _fragmentShader));
|
static_cast<ShaderModuleGL*>(_fragmentShaderModule)->compileShader(backend::ShaderStage::FRAGMENT, SHADER_PREDEFINE + _fragmentShader);
|
||||||
compileProgram();
|
compileProgram();
|
||||||
computeUniformInfos();
|
computeUniformInfos();
|
||||||
|
|
||||||
|
@ -341,7 +341,8 @@ int ProgramGL::getOriginalLocation(int location) const
|
||||||
|
|
||||||
const UniformInfo& ProgramGL::getActiveUniformInfo(ShaderStage stage, int location) const
|
const UniformInfo& ProgramGL::getActiveUniformInfo(ShaderStage stage, int location) const
|
||||||
{
|
{
|
||||||
return std::move(UniformInfo{});
|
static const UniformInfo s_emptyInfo{};
|
||||||
|
return s_emptyInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::unordered_map<std::string, UniformInfo>& ProgramGL::getAllActiveUniformInfo(ShaderStage stage) const
|
const std::unordered_map<std::string, UniformInfo>& ProgramGL::getAllActiveUniformInfo(ShaderStage stage) const
|
||||||
|
|
Loading…
Reference in New Issue