From 4cffdc1cd2b02eeaed6c11ca54c7c32226b9c100 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 17 Nov 2024 21:37:17 -0700 Subject: [PATCH] cleanup: don't pass bool by reference --- include/common/polylib.hh | 6 +++--- lightpreview/glview.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/common/polylib.hh b/include/common/polylib.hh index ac7445ac..8b482f32 100644 --- a/include/common/polylib.hh +++ b/include/common/polylib.hh @@ -944,7 +944,7 @@ public: */ template twosided>> clip( - const qplane3d &plane, const float_type &on_epsilon = DEFAULT_ON_EPSILON, const bool &keepon = false) const + const qplane3d &plane, const float_type &on_epsilon = DEFAULT_ON_EPSILON, bool keepon = false) const { float_type *dists = (float_type *)alloca(sizeof(float_type) * (size() + 1)); planeside_t *sides = (planeside_t *)alloca(sizeof(planeside_t) * (size() + 1)); @@ -1016,7 +1016,7 @@ public: */ template std::optional clip_front( - const qplane3 &plane, const float_type &on_epsilon = DEFAULT_ON_EPSILON, const bool &keepon = false) + const qplane3 &plane, const float_type &on_epsilon = DEFAULT_ON_EPSILON, bool keepon = false) { float_type *dists = (float_type *)alloca(sizeof(float_type) * (size() + 1)); planeside_t *sides = (planeside_t *)alloca(sizeof(planeside_t) * (size() + 1)); @@ -1080,7 +1080,7 @@ public: ================== */ std::optional clip_back( - const qplane3d &plane, const float_type &on_epsilon = DEFAULT_ON_EPSILON, const bool &keepon = false) + const qplane3d &plane, const float_type &on_epsilon = DEFAULT_ON_EPSILON, bool keepon = false) { float_type *dists = (float_type *)alloca(sizeof(float_type) * (size() + 1)); planeside_t *sides = (planeside_t *)alloca(sizeof(planeside_t) * (size() + 1)); diff --git a/lightpreview/glview.h b/lightpreview/glview.h index 6c0003d6..b0683bed 100644 --- a/lightpreview/glview.h +++ b/lightpreview/glview.h @@ -253,7 +253,7 @@ public: // intensity = 0 to 200 void setLightStyleIntensity(int style_id, int intensity); void setMagFilter(QOpenGLTexture::Filter filter); - const bool &getKeepOrigin() const { return m_keepOrigin; } + bool getKeepOrigin() const { return m_keepOrigin; } void setDrawTranslucencyAsOpaque(bool drawopaque); void setShowBmodels(bool bmodels); void setBrightness(float brightness);