summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorDon Lewis <truckman@apache.org>2016-09-01 22:08:51 +0000
committerDon Lewis <truckman@apache.org>2016-09-01 22:08:51 +0000
commitd8e7261d2d1992eb7e36ff9fbb58b26688168bf3 (patch)
tree65d29d55ed5c4ac17e3d425c55b03b00f207e6aa /sd
parentcc9823f5bde6f49eb75e4ad0e8f8a162bf341f34 (diff)
Fix by far the largest source of -Wtautological-undefined-compare
compile warnings. The class definition for SdrMarkView in svx/inc/svx/svdmrkv.hxx contains two inline methods that take a reference argument and perform an &rArg == NULL test on it. The compiler warns that this condition should always be false because dereferencing a NULL pointer to generate a reference is not valid in C++ and a valid reference will never be at address 0. Warnings are generated every time this header is included in a .cxx file. It turns out that there are no callers for the IsGluePoint() method, so just comment out its definition. It also turns out that all the callers of IsPointMarked() pass it a dereferenced pointer, so convert IsPointMarked() to take a pointer argument and modify all the callers to pass a pointer without dereferencing it first.
Notes
Notes: prefer: 16889f355d1f7157bad84b42ad5a1b2b715ae767
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/motionpathtag.cxx6
-rw-r--r--sd/source/ui/func/fupoor.cxx2
-rw-r--r--sd/source/ui/func/fusel.cxx4
3 files changed, 6 insertions, 6 deletions
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index 1fc0f667c784..71010a4d26d8 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -552,7 +552,7 @@ bool MotionPathTag::MouseButtonDown( const MouseEvent& rMEvt, SmartHdl& rHdl )
else
{
SmartHdl* pHdl = &rHdl;
- if (!mrView.IsPointMarked(*pHdl) || rMEvt.IsShift())
+ if (!mrView.IsPointMarked(pHdl) || rMEvt.IsShift())
{
if (!rMEvt.IsShift())
{
@@ -561,7 +561,7 @@ bool MotionPathTag::MouseButtonDown( const MouseEvent& rMEvt, SmartHdl& rHdl )
}
else
{
- if (mrView.IsPointMarked(*pHdl) )
+ if (mrView.IsPointMarked(pHdl) )
{
mrView.UnmarkPoint(*pHdl);
pHdl = NULL;
@@ -698,7 +698,7 @@ bool MotionPathTag::OnMarkHandle( const KeyEvent& rKEvt )
sal_uInt32 nPol(pHdl->GetPolyNum());
sal_uInt32 nPnt(pHdl->GetPointNum());
- if(mrView.IsPointMarked(*pHdl))
+ if(mrView.IsPointMarked(pHdl))
{
if(rKEvt.GetKeyCode().IsShift())
{
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index 9c042d41d959..eb0da7bdba81 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -596,7 +596,7 @@ sal_Bool FuPoor::KeyInput(const KeyEvent& rKEvt)
sal_uInt32 nPol(pHdl->GetPolyNum());
sal_uInt32 nPnt(pHdl->GetPointNum());
- if(mpView->IsPointMarked(*pHdl))
+ if(mpView->IsPointMarked(pHdl))
{
if(rKEvt.GetKeyCode().IsShift())
{
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 617f66667fb3..7ed3d9263416 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -497,7 +497,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
/******************************************************************
* Klebepunkt selektieren
******************************************************************/
- if (!mpView->IsPointMarked(*aVEvt.pHdl) || rMEvt.IsShift())
+ if (!mpView->IsPointMarked(aVEvt.pHdl) || rMEvt.IsShift())
{
if (!rMEvt.IsShift())
{
@@ -506,7 +506,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
}
else
{
- if (mpView->IsPointMarked(*aVEvt.pHdl))
+ if (mpView->IsPointMarked(aVEvt.pHdl))
{
mpView->UnmarkPoint(*aVEvt.pHdl);
pHdl = NULL;