]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/shader.cpp
Fix various variables passed by copy instead of const ref (#5610)
[dragonfireclient.git] / src / shader.cpp
index 79485025b30675169d4fc034aecf1b21c1f6cb50..66f32c9a1846bc6e6439f63829841bbc72306698 100644 (file)
@@ -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)