diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-06-11 13:20:00 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-06-11 15:37:21 +0200 |
commit | b5cb211f80fd87c109633232cf340ac7969c8648 (patch) | |
tree | 7da4817be25f252ed71f48d4385c09cf4a6a5f03 /vcl | |
parent | ac411c83c82babb325e2bfd32f4e7009e86eac78 (diff) |
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>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/osx/OSXTransferable.cxx | 2 | ||||
-rw-r--r-- | vcl/osx/clipboard.cxx | 2 | ||||
-rw-r--r-- | vcl/quartz/salbmp.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/vcl/osx/OSXTransferable.cxx b/vcl/osx/OSXTransferable.cxx index 92f997f90d34..6f8613799111 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 c2adb5bfcd3c..48c2a94e7bfd 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 87861256be43..524fad183b8e 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 { |