From cf37a5569002e83cc4d6916b39118ceba134da1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Wed, 19 Apr 2017 00:36:30 +0200 Subject: Fix various variables passed by copy instead of const ref (#5610) Pointed by cppcheck --- src/shader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shader.cpp') 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 &callbacks, const std::vector &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 &callbacks, const std::vector &setter_factories, SourceShaderCache *sourcecache) -- cgit v1.2.3