[glom/glom-1-26] LayoutItem::operator==(): Fix a comparison to self.



commit 7d138309abb77d86a27c5c94ee7516a93aef9e00
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Dec 2 22:05:25 2014 +0100

    LayoutItem::operator==(): Fix a comparison to self.
    
    Found by Coverity Scan.

 glom/libglom/data_structure/layout/layoutitem.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glom/libglom/data_structure/layout/layoutitem.cc 
b/glom/libglom/data_structure/layout/layoutitem.cc
index a7ca91a..6b1e4de 100644
--- a/glom/libglom/data_structure/layout/layoutitem.cc
+++ b/glom/libglom/data_structure/layout/layoutitem.cc
@@ -116,7 +116,7 @@ bool LayoutItem::operator==(const LayoutItem& src) const
     //compare them:
     equal = equal && (*m_positions == *(src.m_positions));
   }
-  else if(!m_positions && !m_positions)
+  else if(!m_positions && !src.m_positions)
   {
     //no change.
   }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]