Skip to content

Commit 728409c

Browse files
Added != operator for Color struct into header file
1 parent 9bbee82 commit 728409c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

include/Utils.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ struct Color {
1313
: r(r), g(g), b(b), a(a) {}
1414
};
1515

16+
bool operator==(const Color &lhs, const Color &rhs);
17+
bool operator!=(const Color &lhs, const Color &rhs);
18+
1619
struct Pixel {
1720
int x;
1821
int y;
@@ -22,6 +25,9 @@ struct Pixel {
2225
Pixel(int x, int y, Color color) : x(x), y(y), color(color) {}
2326
};
2427

28+
bool operator==(const Pixel &lhs, const Pixel &rhs);
29+
bool operator!=(const Pixel &lhs, const Pixel &rhs);
30+
2531
using Pixels = std::vector<Pixel>;
2632

2733
class Texture;

0 commit comments

Comments
 (0)