diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-06-10 18:31:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-10 18:31:07 +0300 |
commit | 737bf1ba9431aa35e2e510c5de76fd6a632c61b8 (patch) | |
tree | 08e343c11fccda03b28aaf2cec34a06c98d8aa77 /indra/llcommon/llalignedarray.h | |
parent | 34dfd7d5996b1b6117c2155bb95aeb377038bb6e (diff) | |
parent | 13b08c8ae1c3b92236f156fba5686f231abfb711 (diff) |
Merge pull request #1676 from Ansariel/DRTVWR-600-maint-A
Re-enable compiler warnings C4018, C4100, C4231 and C4506
Diffstat (limited to 'indra/llcommon/llalignedarray.h')
-rw-r--r-- | indra/llcommon/llalignedarray.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llcommon/llalignedarray.h b/indra/llcommon/llalignedarray.h index 0ba8b34cb6..8248f82186 100644 --- a/indra/llcommon/llalignedarray.h +++ b/indra/llcommon/llalignedarray.h @@ -116,7 +116,7 @@ void LLAlignedArray<T, alignment>::resize(U32 size) template <class T, U32 alignment> T& LLAlignedArray<T, alignment>::operator[](int idx) { - if(idx >= mElementCount || idx < 0) + if (idx < 0 || unsigned(idx) >= mElementCount) { LL_ERRS() << "Out of bounds LLAlignedArray, requested: " << (S32)idx << " size: " << mElementCount << LL_ENDL; } @@ -126,7 +126,7 @@ T& LLAlignedArray<T, alignment>::operator[](int idx) template <class T, U32 alignment> const T& LLAlignedArray<T, alignment>::operator[](int idx) const { - if (idx >= mElementCount || idx < 0) + if (idx < 0 || unsigned(idx) >= mElementCount) { LL_ERRS() << "Out of bounds LLAlignedArray, requested: " << (S32)idx << " size: " << mElementCount << LL_ENDL; } |