summaryrefslogtreecommitdiff
path: root/src/shader.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-04-19 00:36:30 +0200
committerGitHub <noreply@github.com>2017-04-19 00:36:30 +0200
commitcf37a5569002e83cc4d6916b39118ceba134da1b (patch)
tree4de13e55c8f2b37fca85f4c9a4b15e52bc0f030a /src/shader.cpp
parent5f2af7c4e80da1c646e5a19ceed5bd0871b56e85 (diff)
downloadminetest-cf37a5569002e83cc4d6916b39118ceba134da1b.tar.gz
minetest-cf37a5569002e83cc4d6916b39118ceba134da1b.tar.bz2
minetest-cf37a5569002e83cc4d6916b39118ceba134da1b.zip
Fix various variables passed by copy instead of const ref (#5610)
Pointed by cppcheck
Diffstat (limited to 'src/shader.cpp')
-rw-r--r--src/shader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shader.cpp b/src/shader.cpp
index 79485025b..66f32c9a1 100644
--- a/src/shader.cpp
+++ b/src/shader.cpp
@@ -340,7 +340,7 @@ IWritableShaderSource* createShaderSource(IrrlichtDevice *device)
/*
Generate shader given the shader name.
*/
-ShaderInfo generate_shader(std::string name,
+ShaderInfo generate_shader(const std::string &name,
u8 material_type, u8 drawtype,
IrrlichtDevice *device, std::vector<ShaderCallback *> &callbacks,
const std::vector<IShaderConstantSetterFactory*> &setter_factories,
@@ -525,7 +525,7 @@ void ShaderSource::rebuildShaders()
}
-ShaderInfo generate_shader(std::string name, u8 material_type, u8 drawtype,
+ShaderInfo generate_shader(const std::string &name, u8 material_type, u8 drawtype,
IrrlichtDevice *device, std::vector<ShaderCallback *> &callbacks,
const std::vector<IShaderConstantSetterFactory*> &setter_factories,
SourceShaderCache *sourcecache)