From 0be2a3fa2a1838f2862a75123a6dea567272c09e Mon Sep 17 00:00:00 2001 From: Sara Date: Wed, 4 Jun 2025 00:18:45 +0200 Subject: [PATCH] feat: added equality operator for SDL_Point --- src/core/roguedefs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/roguedefs.h b/src/core/roguedefs.h index a750958..2c8b939 100644 --- a/src/core/roguedefs.h +++ b/src/core/roguedefs.h @@ -14,4 +14,8 @@ typedef SDL_Point Tile; typedef SDL_Point Chunk; typedef unsigned Sprite; +static inline bool operator==(SDL_Point const &lhs, SDL_Point const &rhs) { + return lhs.x == rhs.x && lhs.y == rhs.y; +} + #endif // !ROGUEDEFS_H