aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/archdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'ecp5/archdefs.h')
-rw-r--r--ecp5/archdefs.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/ecp5/archdefs.h b/ecp5/archdefs.h
index f185da72..0af48753 100644
--- a/ecp5/archdefs.h
+++ b/ecp5/archdefs.h
@@ -60,13 +60,13 @@ enum PortPin : int32_t
PIN_MAXIDX
};
-NPNR_PACKED_STRUCT(
-struct Location {
+NPNR_PACKED_STRUCT(struct Location {
int16_t x = -1, y = -1;
bool operator==(const Location &other) const { return x == other.x && y == other.y; }
bool operator!=(const Location &other) const { return x != other.x || y == other.y; }
-}
-);
+});
+
+Location operator+(const Location &a, const Location &b) { return Location{a.x + b.x, a.y + b.y};}
struct BelId
{