loplugin:simplifypointertobool (macOS)
Change-Id: I414eaf0e61be09ccf12d04577c89dbcdb845f85f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96117
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
diff --git a/vcl/osx/OSXTransferable.cxx b/vcl/osx/OSXTransferable.cxx
index 92f997f..6f86137 100644
--- a/vcl/osx/OSXTransferable.cxx
+++ b/vcl/osx/OSXTransferable.cxx
@@ -129,7 +129,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
dp = DataFlavorMapper::getDataProvider(sysFormat, sysData);
}
if (dp.get() == nullptr)
if (!dp)
{
throw UnsupportedFlavorException("AquaClipboard: Unsupported data flavor",
static_cast<XTransferable*>(this));
diff --git a/vcl/osx/clipboard.cxx b/vcl/osx/clipboard.cxx
index c2adb5b..48c2a94 100644
--- a/vcl/osx/clipboard.cxx
+++ b/vcl/osx/clipboard.cxx
@@ -293,7 +293,7 @@ void AquaClipboard::provideDataForType(NSPasteboard* sender, const NSString* typ
DataProviderPtr_t dp = mpDataFlavorMapper->getDataProvider(type, mXClipboardContent);
NSData* pBoardData = nullptr;
if (dp.get() != nullptr)
if (dp)
{
pBoardData = dp->getSystemData();
[sender setData: pBoardData forType:const_cast<NSString*>(type)];
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index 8786125..524fad1 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -300,7 +300,7 @@ bool QuartzSalBitmap::AllocateUserData()
mnBytesPerRow = 0;
}
return m_pUserBuffer.get() != nullptr;
return bool(m_pUserBuffer);
}
namespace {