[Libreoffice-commits] core.git: 2 commits - sfx2/source

Stephan Bergmann sbergman at redhat.com
Mon Aug 11 07:22:43 PDT 2014


 sfx2/source/dialog/taskpane.cxx |    2 +-
 sfx2/source/menu/virtmenu.cxx   |    3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit b3d281f5c2c69cbbe8f90115e76ebbe5263d0ec7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Aug 11 16:21:40 2014 +0200

    -Werror,-Wtautological-undefined-compare
    
    ("'this' pointer cannot be null in well-defined C++ code; comparison may be
    assumed to always evaluate to true")
    
    Change-Id: Id3b886135f43b39a2fcf2bb197cf6a80d6532365

diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index 434198d..59f0fbe 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -990,7 +990,6 @@ IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu )
 
 void SfxVirtualMenu::CheckItem( sal_uInt16 nItemId, bool bCheck )
 {
-    DBG_ASSERT( this != 0, "");
     DBG_ASSERT( pSVMenu != 0, "" );
     if (pSVMenu->GetItemPos( nItemId ) != MENU_ITEM_NOTFOUND )
         pSVMenu->CheckItem( nItemId, bCheck );
@@ -1001,7 +1000,6 @@ void SfxVirtualMenu::CheckItem( sal_uInt16 nItemId, bool bCheck )
 
 void SfxVirtualMenu::EnableItem( sal_uInt16 nItemId, bool bEnable )
 {
-    DBG_ASSERT( this != 0, "");
     DBG_ASSERT( pSVMenu != 0, "" );
 
     if (pSVMenu->GetItemPos( nItemId ) != MENU_ITEM_NOTFOUND )
@@ -1013,7 +1011,6 @@ void SfxVirtualMenu::EnableItem( sal_uInt16 nItemId, bool bEnable )
 
 void SfxVirtualMenu::SetItemText( sal_uInt16 nItemId, const OUString& rText )
 {
-    DBG_ASSERT( this != 0, "");
     DBG_ASSERT( pSVMenu != 0, "" );
     if (pSVMenu->GetItemPos( nItemId ) != MENU_ITEM_NOTFOUND )
         pSVMenu->SetItemText( nItemId, rText );
commit ae4fdbaac97341681bf38b2dc6e9925bc462ae9a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Aug 11 16:19:47 2014 +0200

    -Werror,-Wtautological-undefined-compare
    
    ("reference cannot be bound to dereferenced null pointer in well-defined C++
    code; comparison may be assumed to always evaluate to true")
    
    Change-Id: I78498b6be6cf3f6f15a80187c9a24dfcdd91d3be

diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 67ca560..7107fc0 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -975,7 +975,7 @@ namespace sfx2
 
     IMPL_LINK( TaskPaneController_Impl, DockingChanged, TitledDockingWindow*, i_pDockingWindow )
     {
-        ENSURE_OR_RETURN( i_pDockingWindow && &m_rDockingWindow, "TaskPaneController_Impl::DockingChanged: where does this come from?", 0L );
+        ENSURE_OR_RETURN( i_pDockingWindow, "TaskPaneController_Impl::DockingChanged: where does this come from?", 0L );
 
         if ( impl_getLayout() == LAYOUT_DRAWERS )
             return 0L;


More information about the Libreoffice-commits mailing list