Author: Carlos Lopez <[email protected]>
Date: Mon Aug 8 13:29:00 2011 +0100
Add operator == to DashItem class
---
synfig-core/src/synfig/dashitem.cpp | 9 +++++++++
synfig-core/src/synfig/dashitem.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/synfig-core/src/synfig/dashitem.cpp
b/synfig-core/src/synfig/dashitem.cpp
index a0aca8b..8b2d11c 100644
--- a/synfig-core/src/synfig/dashitem.cpp
+++ b/synfig-core/src/synfig/dashitem.cpp
@@ -116,3 +116,12 @@ DashItem::get_side_type(int i)const
{
return i>0? side_type_[1]: side_type_[0];
}
+
+bool
+DashItem::operator == (const DashItem& rhs)
+{
+ return side_type_[0] == rhs.get_side_type(0) &&
+ side_type_[1] == rhs.get_side_type(1) &&
+ length_ == rhs.get_length() &&
+ offset_ == rhs.get_offset();
+}
diff --git a/synfig-core/src/synfig/dashitem.h
b/synfig-core/src/synfig/dashitem.h
index 08eacf2..bdaad12 100644
--- a/synfig-core/src/synfig/dashitem.h
+++ b/synfig-core/src/synfig/dashitem.h
@@ -66,6 +66,7 @@ public:
int get_side_type_after()const;
void set_side_type_after(int sideafter);
int get_side_type(int i)const;
+ bool operator == (const DashItem& rhs);
}; // END of class DashItem
}; // END of namespace synfig
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl