From 6866e6f2fa1cfa8f91a940936296d3ecb5317640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Thu, 9 Nov 2023 14:33:46 +0100 Subject: [PATCH] Remove QT_MAKE_UNCHECKED_ARRAY_ITERATOR We only used it in one location and it's no longer needed. Change-Id: I2092313b75d4510dda12f8f6decc9652f8191301 Reviewed-by: Marc Mutz --- src/corelib/global/qcompilerdetection.h | 1 - src/plugins/platforms/windows/qwindowsinputcontext.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 4159eac093..0a6295af8a 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -77,7 +77,6 @@ # define Q_DECL_EXPORT __declspec(dllexport) # define Q_DECL_IMPORT __declspec(dllimport) # if _MSC_VER < 1938 // stdext is deprecated since VS 2022 17.8 -# define QT_MAKE_UNCHECKED_ARRAY_ITERATOR(x) stdext::make_unchecked_array_iterator(x) // Since _MSC_VER >= 1800 # define QT_MAKE_CHECKED_ARRAY_ITERATOR(x, N) stdext::make_checked_array_iterator(x, size_t(N)) // Since _MSC_VER >= 1500 # endif # define Q_COMPILER_COMPLAINS_ABOUT_RETURN_AFTER_UNREACHABLE diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.cpp b/src/plugins/platforms/windows/qwindowsinputcontext.cpp index 758490ffb7..0281025b5b 100644 --- a/src/plugins/platforms/windows/qwindowsinputcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsinputcontext.cpp @@ -676,7 +676,7 @@ int QWindowsInputContext::reconvertString(RECONVERTSTRING *reconv) reconv->dwTargetStrOffset = reconv->dwCompStrOffset; auto *pastReconv = reinterpret_cast(reconv + 1); std::copy(surroundingText.utf16(), surroundingText.utf16() + surroundingText.size(), - QT_MAKE_UNCHECKED_ARRAY_ITERATOR(pastReconv)); + pastReconv); return memSize; }