From ec494babbef305c69e24d79311ad07984a1b2463 Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Sun, 16 Mar 2014 11:58:45 +0100 Subject: [PATCH] Passed BlendMode objects by const-reference --- include/SFML/Graphics/RenderStates.hpp | 4 ++-- src/SFML/Graphics/RenderStates.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/SFML/Graphics/RenderStates.hpp b/include/SFML/Graphics/RenderStates.hpp index bae862978..986554b8e 100644 --- a/include/SFML/Graphics/RenderStates.hpp +++ b/include/SFML/Graphics/RenderStates.hpp @@ -66,7 +66,7 @@ public : /// \param theBlendMode Blend mode to use /// //////////////////////////////////////////////////////////// - RenderStates(BlendMode theBlendMode); + RenderStates(const BlendMode& theBlendMode); //////////////////////////////////////////////////////////// /// \brief Construct a default set of render states with a custom transform @@ -101,7 +101,7 @@ public : /// \param theShader Shader to use /// //////////////////////////////////////////////////////////// - RenderStates(BlendMode theBlendMode, const Transform& theTransform, + RenderStates(const BlendMode& theBlendMode, const Transform& theTransform, const Texture* theTexture, const Shader* theShader); //////////////////////////////////////////////////////////// diff --git a/src/SFML/Graphics/RenderStates.cpp b/src/SFML/Graphics/RenderStates.cpp index d66ec42a1..2ec3fb895 100644 --- a/src/SFML/Graphics/RenderStates.cpp +++ b/src/SFML/Graphics/RenderStates.cpp @@ -56,7 +56,7 @@ shader (NULL) //////////////////////////////////////////////////////////// -RenderStates::RenderStates(BlendMode theBlendMode) : +RenderStates::RenderStates(const BlendMode& theBlendMode) : blendMode(theBlendMode), transform(), texture (NULL), @@ -86,7 +86,7 @@ shader (theShader) //////////////////////////////////////////////////////////// -RenderStates::RenderStates(BlendMode theBlendMode, const Transform& theTransform, +RenderStates::RenderStates(const BlendMode& theBlendMode, const Transform& theTransform, const Texture* theTexture, const Shader* theShader) : blendMode(theBlendMode), transform(theTransform),