From 993d645cf0afa6bb9bc909c285cafaa231b22b55 Mon Sep 17 00:00:00 2001 From: Alex Foster <123afoster@gmail.com> Date: Tue, 8 Jun 2021 23:50:44 -0700 Subject: [PATCH] renderlights.cpp const -> constexpr for #210 --- src/engine/render/renderlights.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/render/renderlights.cpp b/src/engine/render/renderlights.cpp index c362a115f..bcd7c58f2 100644 --- a/src/engine/render/renderlights.cpp +++ b/src/engine/render/renderlights.cpp @@ -1108,7 +1108,7 @@ struct shadowcache : hashtable } }; -static const int shadowcacheevict = 2; +static constexpr int shadowcacheevict = 2; GLuint shadowatlastex = 0, shadowatlasfbo = 0; @@ -1263,7 +1263,7 @@ const matrix4 cubeshadowviewmatrix[6] = matrix4(vec(1, 0, 0), vec(0, 1, 0), vec(0, 0, 1)) // -Z }; -static const int LightTile_MaxBatch = 8; //also used in lightbatchkey below +static constexpr int LightTile_MaxBatch = 8; //also used in lightbatchkey below VARF(lighttilebatch, 0, LightTile_MaxBatch, LightTile_MaxBatch, cleardeferredlightshaders()); VARF(batchsunlight, 0, 2, 2, cleardeferredlightshaders());