From fd6d48cbb8b43aa13d475873f1a5355106b2e649 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 19 Nov 2019 15:24:10 +0100 Subject: loplugin:fakebool (clang-cl) (the use of `BOOL gotACP` in osl_getThreadTextEncoding was already safe in the past, converting from 16-bit HIWORD to 32-bit BOOL and then using operator!) Change-Id: Ic5019093b350b968edfcf0878126671285891502 Reviewed-on: https://gerrit.libreoffice.org/83210 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sal/osl/w32/thread.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sal') diff --git a/sal/osl/w32/thread.cxx b/sal/osl/w32/thread.cxx index a0f46b7e5229..b9eccf3b8bab 100644 --- a/sal/osl/w32/thread.cxx +++ b/sal/osl/w32/thread.cxx @@ -495,7 +495,7 @@ sal_Bool SAL_CALL osl_setThreadKeyData(oslThreadKey Key, void *pData) { PTLS pTls = static_cast(Key); void* pOldData = nullptr; - BOOL fSuccess; + bool fSuccess; if ( pTls->pfnCallback ) pOldData = TlsGetValue( pTls->dwIndex ); @@ -505,7 +505,7 @@ sal_Bool SAL_CALL osl_setThreadKeyData(oslThreadKey Key, void *pData) if ( fSuccess && pTls->pfnCallback && pOldData ) pTls->pfnCallback( pOldData ); - return fSuccess != FALSE; + return fSuccess; } return false; @@ -517,7 +517,7 @@ rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding(void) { DWORD_PTR dwEncoding; rtl_TextEncoding _encoding; - BOOL gotACP; + bool gotACP; if ( DWORD(-1) == g_dwTLSTextEncodingIndex ) g_dwTLSTextEncodingIndex = TlsAlloc(); -- cgit