[Libreoffice-commits] core.git: vcl/osx vcl/quartz

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 11 13:38:02 UTC 2020


 vcl/osx/OSXTransferable.cxx |    2 +-
 vcl/osx/clipboard.cxx       |    2 +-
 vcl/quartz/salbmp.cxx       |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit b5cb211f80fd87c109633232cf340ac7969c8648
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jun 11 13:20:00 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jun 11 15:37:21 2020 +0200

    loplugin:simplifypointertobool (macOS)
    
    Change-Id: I414eaf0e61be09ccf12d04577c89dbcdb845f85f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96117
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

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 {


More information about the Libreoffice-commits mailing list