Skip to content

Commit 9d0f64b

Browse files
committed
Core (LV::Palette): Add comparison operators.
1 parent 9f20838 commit 9d0f64b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

libvisual/libvisual/lv_palette.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ namespace LV {
7070
return *this;
7171
}
7272

73+
constexpr friend bool operator== (Palette const& lhs, Palette const& rhs)
74+
{
75+
return lhs.colors == rhs.colors;
76+
}
77+
78+
constexpr friend bool operator!= (Palette const& lhs, Palette const& rhs)
79+
{
80+
return !(lhs == rhs);
81+
}
82+
7383
bool empty () const
7484
{
7585
return colors.empty ();

0 commit comments

Comments
 (0)