summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2021-01-22 16:48:31 -0800
committerPtolemy <ptolemy@lindenlab.com>2021-01-25 15:55:22 -0800
commit7b2dd98962c92a4ae84ce8042109f0d9ec9b4b56 (patch)
tree9f644bc72d4f98f2c8d6d60fe096fd9461deef1e /indra/llwindow
parent760c6a996a594ecc68e06fac79f6093fd5d5ee6d (diff)
SL-14705: Cleanup U32 S32 cast
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llwindowwin32.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 0db9886d03..afe0c2cc6a 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1476,6 +1476,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
S32 swap_method = 0;
S32 cur_format = 0;
+const S32 max_format = (S32)num_formats - 1;
GLint swap_query = WGL_SWAP_METHOD_ARB;
// SL-14705 Fix name tags showing in front of objects with AMD GPUs.
@@ -1488,7 +1489,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
{
break;
}
- else if (cur_format >= (S32)(num_formats - 1))
+ else if (cur_format >= max_format)
{
cur_format = 0;
break;