summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-02-09 16:27:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-02-09 19:41:51 +0100
commit8f22ce5ea3e62a4837773f6958b8ce7ac96f811a (patch)
tree255d12a2d154c40cc9b58e25c29f228d73cedacd /vcl
parent2d154d55db925dfa20358faa0302d4d942496aee (diff)
loplugin:fakebool (clang-cl)
But GetMessageW encodes more than true vs. false in its BOOL return value, so silence the unhelpful loplugin with auto. Change-Id: I77d053b760e93f918367532c63a6dfe963faa12d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110645 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/dtrans/MtaOleClipb.cxx10
-rw-r--r--vcl/win/dtrans/target.cxx8
2 files changed, 13 insertions, 5 deletions
diff --git a/vcl/win/dtrans/MtaOleClipb.cxx b/vcl/win/dtrans/MtaOleClipb.cxx
index f6e471925516..3898bdc30dfb 100644
--- a/vcl/win/dtrans/MtaOleClipb.cxx
+++ b/vcl/win/dtrans/MtaOleClipb.cxx
@@ -654,10 +654,14 @@ unsigned int CMtaOleClipboard::run( )
nRet = 0;
// pumping messages
- MSG msg;
- BOOL bRet;
- while ((bRet = GetMessageW(&msg, nullptr, 0, 0)) != 0)
+ for (;;)
{
+ MSG msg;
+ auto const bRet = GetMessageW(&msg, nullptr, 0, 0);
+ if (bRet == 0)
+ {
+ break;
+ }
if (-1 == bRet)
{
SAL_WARN("vcl.win.dtrans", "GetMessageW failed: " << WindowsErrorString(GetLastError()));
diff --git a/vcl/win/dtrans/target.cxx b/vcl/win/dtrans/target.cxx
index 45a8515bd414..2492c8a3cc94 100644
--- a/vcl/win/dtrans/target.cxx
+++ b/vcl/win/dtrans/target.cxx
@@ -208,9 +208,13 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams)
DWORD threadId= GetCurrentThreadId();
// We force the creation of a thread message queue. This is necessary
// for a later call to AttachThreadInput
- BOOL bRet;
- while ((bRet = GetMessageW(&msg, nullptr, 0, 0)) != 0)
+ for (;;)
{
+ auto const bRet = GetMessageW(&msg, nullptr, 0, 0);
+ if (bRet == 0)
+ {
+ break;
+ }
if (-1 == bRet)
{
SAL_WARN("vcl.win.dtrans", "GetMessageW failed: " << WindowsErrorString(GetLastError()));