[Aptitude-svn-commit] r3280 - in branches/aptitude-0.3/aptitude: . src/vscreen/config
Daniel Burrows
dburrows@costa.debian.org
Tue, 10 May 2005 13:15:48 +0000
Author: dburrows
Date: Tue May 10 13:15:46 2005
New Revision: 3280
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/vscreen/config/style.h
Log:
Make styles equality-comparable.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Tue May 10 13:15:46 2005
@@ -1,5 +1,9 @@
2005-05-10 Daniel Burrows <dburrows@debian.org>
+ * src/vscreen/config/style.h:
+
+ Write operator== and operator!=.
+
* src/vscreen/fragment.cc:
Fix compile errors.
Modified: branches/aptitude-0.3/aptitude/src/vscreen/config/style.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/config/style.h (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/config/style.h Tue May 10 13:15:46 2005
@@ -128,6 +128,20 @@
return *this;
}
+ bool operator==(const style &other)
+ {
+ return fg == other.fg && bg == other.bg &&
+ set_attrs == other.set_attrs && clear_attrs == other.clear_attrs &&
+ flip_attrs == other.flip_attrs;
+ }
+
+ bool operator!=(const style &other)
+ {
+ return fg != other.fg || bg != other.bg ||
+ set_attrs != other.set_attrs || clear_attrs != other.clear_attrs ||
+ flip_attrs != other.flip_attrs;
+ }
+
/** \return the foreground color. */
short get_fg() const {return fg<0?0:fg;}
/** \return the background color. */