From abec74401030826f15b2cdf9e281a95887c5e369 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Tue, 3 Dec 2024 08:50:22 +1100 Subject: Feature [feature-requests:#1537]. Declare IME retrieval methods const. --- win32/ScintillaWin.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index cae80473b..b11a0a95b 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -270,7 +270,7 @@ public: return ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, nullptr, 0); } - std::vector GetImeAttributes() { + std::vector GetImeAttributes() const { const int attrLen = ::ImmGetCompositionStringW(hIMC, GCS_COMPATTR, nullptr, 0); std::vector attr(attrLen, 0); ::ImmGetCompositionStringW(hIMC, GCS_COMPATTR, &attr[0], static_cast(attr.size())); @@ -282,7 +282,7 @@ public: return byteLen / sizeof(wchar_t); } - std::wstring GetCompositionString(DWORD dwIndex) { + std::wstring GetCompositionString(DWORD dwIndex) const { const LONG byteLen = ::ImmGetCompositionStringW(hIMC, dwIndex, nullptr, 0); std::wstring wcs(byteLen / 2, 0); ::ImmGetCompositionStringW(hIMC, dwIndex, &wcs[0], byteLen); -- cgit v1.2.3