From 9f92cab6b884711ca8be050b500a2880a955f001 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 23 Jun 2018 15:49:21 +0100 Subject: Switching to east const This is compared to const west, which is not very consistent, as const always acts on what is on its left, and if there isn't anything on the left, it will act on what is on its right. By always placing const on the right of what it should act on, the rule becomes more consistent. --- yage/render/shader.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'yage/render/shader.h') diff --git a/yage/render/shader.h b/yage/render/shader.h index d91753cb..75a24c6d 100644 --- a/yage/render/shader.h +++ b/yage/render/shader.h @@ -20,7 +20,7 @@ namespace yage class Shader { public: - Shader(const std::string &vertex_path, const std::string &fragment_path); + Shader(std::string const &vertex_path, std::string const &fragment_path); Shader(const Shader &) = delete; Shader(Shader &&) = delete; ~Shader(); @@ -32,16 +32,16 @@ public: void use() const; /// set uniforms of different type - void setUniform(const std::string &name, int value) const; - void setUniform(const std::string &name, float value) const; - void setUniform(const std::string &name, const glm::mat4 &matrix) const; + void setUniform(std::string const &name, int value) const; + void setUniform(std::string const &name, float value) const; + void setUniform(std::string const &name, const glm::mat4 &matrix) const; private: /// compiled shader program id GLuint program_id_ = 0; - GLint getUniformLocation(const std::string &uniform_name) const; - void errorCheck(GLuint shader, const std::string &shader_type) const; + GLint getUniformLocation(std::string const &uniform_name) const; + void errorCheck(GLuint shader, std::string const &shader_type) const; }; } // namespace yage -- cgit