diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-04-26 10:16:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-04-29 09:29:50 +0200 |
commit | 5354d8fb170418c130c08b070029f09337573ef6 (patch) | |
tree | 40644b3c8d16dbeb25b8084a35d16f36140f4375 | |
parent | bd4964c57def05936dae00de3e4615eaf9f51cfd (diff) |
WaE: C6326: Potential comparison of a constant with another constant
if msvc -analyze is used
Change-Id: I5905447a79e8e50d70281e0c230d1ce3b13fc475
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166704
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | include/rtl/ustring.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 14a9d2cf8b36..39567014c395 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -357,7 +357,7 @@ public: assert( libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal)); pData = NULL; - if (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) { + if SAL_CONSTEXPR (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) { rtl_uString_new(&pData); } else { rtl_uString_newFromLiteral( @@ -620,7 +620,7 @@ public: { assert( libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal)); - if (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) { + if SAL_CONSTEXPR (libreoffice_internal::ConstCharArrayDetector<T>::length == 0) { rtl_uString_new(&pData); } else { rtl_uString_newFromLiteral( |