diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-07-21 21:40:06 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-07-21 21:40:06 +0200 |
commit | 30e2f0e1e8cfdb24abe6c3a8013691497c706975 (patch) | |
tree | b6f1ed038065063dbfbca1cbd88d2f7cf4f7e8a1 /common | |
parent | f438fc615b829170679971110b5d1bb57fba6a86 (diff) | |
download | nextpnr-30e2f0e1e8cfdb24abe6c3a8013691497c706975.tar.gz nextpnr-30e2f0e1e8cfdb24abe6c3a8013691497c706975.tar.bz2 nextpnr-30e2f0e1e8cfdb24abe6c3a8013691497c706975.zip |
Add Loc constructors
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'common')
-rw-r--r-- | common/nextpnr.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h index 40fd3d13..c8915c19 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -164,6 +164,9 @@ struct Loc { int x = -1, y = -1, z = -1; + Loc() {} + Loc(int x, int y, int z) : x(x), y(y), z(z) {} + bool operator==(const Loc &other) const { return (x == other.x) && (y == other.y) && (z == other.z); } bool operator!=(const Loc &other) const { return (x != other.x) || (y != other.y) || (z == other.z); } }; |