From 5b39dc76f1bc82f941d5c800ab9f34407a06b53a Mon Sep 17 00:00:00 2001 From: Igor Pavlov <87184205+ip7z@users.noreply.github.com> Date: Wed, 21 Jun 2023 00:00:00 +0000 Subject: 23.01 --- CPP/Windows/Window.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'CPP/Windows/Window.cpp') diff --git a/CPP/Windows/Window.cpp b/CPP/Windows/Window.cpp index 32af4aa..102c503 100644 --- a/CPP/Windows/Window.cpp +++ b/CPP/Windows/Window.cpp @@ -111,7 +111,7 @@ bool MySetWindowText(HWND wnd, LPCWSTR s) } #endif -bool CWindow::GetText(CSysString &s) +bool CWindow::GetText(CSysString &s) const { s.Empty(); unsigned len = (unsigned)GetTextLength(); @@ -119,7 +119,7 @@ bool CWindow::GetText(CSysString &s) return (::GetLastError() == ERROR_SUCCESS); TCHAR *p = s.GetBuf(len); { - unsigned len2 = (unsigned)GetText(p, (int)(len + 1)); + const unsigned len2 = (unsigned)GetText(p, (int)(len + 1)); if (len > len2) len = len2; } @@ -130,7 +130,7 @@ bool CWindow::GetText(CSysString &s) } #ifndef _UNICODE -bool CWindow::GetText(UString &s) +bool CWindow::GetText(UString &s) const { if (g_IsNT) { @@ -140,7 +140,7 @@ bool CWindow::GetText(UString &s) return (::GetLastError() == ERROR_SUCCESS); wchar_t *p = s.GetBuf(len); { - unsigned len2 = (unsigned)GetWindowTextW(_window, p, (int)(len + 1)); + const unsigned len2 = (unsigned)GetWindowTextW(_window, p, (int)(len + 1)); if (len > len2) len = len2; } @@ -150,7 +150,7 @@ bool CWindow::GetText(UString &s) return true; } CSysString sysString; - bool result = GetText(sysString); + const bool result = GetText(sysString); MultiByteToUnicodeString2(s, sysString); return result; } -- cgit v1.2.3-55-g6feb