From 1d71ea3fc074b62a374309cc24643de6abc0c579 Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 25 Oct 2018 23:29:30 +0000 Subject: [PATCH] polymost_setTexturePosSize() and polymost_setHalfTexelSize(): pass vec4f_t and vec2f_t by const reference instead of by value git-svn-id: https://svn.eduke32.com/eduke32@7085 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/include/polymost.h | 2 +- source/build/src/polymost.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/build/include/polymost.h b/source/build/include/polymost.h index 0f5dd5232..298108b1e 100644 --- a/source/build/include/polymost.h +++ b/source/build/include/polymost.h @@ -46,7 +46,7 @@ void polymost_drawrooms(void); void polymost_resetVertexPointers(void); void polymost_disableProgram(void); void polymost_resetProgram(void); -void polymost_setTexturePosSize(vec4f_t texturePosSize); +void polymost_setTexturePosSize(vec4f_t const &texturePosSize); void polymost_setFogEnabled(char fogEnabled); void polymost_useColorOnly(char useColorOnly); void polymost_usePaletteIndexing(char usePaletteIndexing); diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index d95bc9752..afd38c208 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -614,7 +614,7 @@ static void polymost_setCurrentShaderProgram(uint32_t programID) glUniform1f(polymost1UseGlowMappingLoc, polymost1UseGlowMapping); } -void polymost_setTexturePosSize(vec4f_t texturePosSize) +void polymost_setTexturePosSize(vec4f_t const &texturePosSize) { if (currentShaderProgramID == polymost1CurrentShaderProgramID) { @@ -623,7 +623,7 @@ void polymost_setTexturePosSize(vec4f_t texturePosSize) } } -static void polymost_setHalfTexelSize(vec2f_t halfTexelSize) +static inline void polymost_setHalfTexelSize(vec2f_t const &halfTexelSize) { if (currentShaderProgramID == polymost1CurrentShaderProgramID) {