aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.h
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-12 16:04:02 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-12 16:04:02 +0200
commit330d393c59f331178865ce34b68d654766d36289 (patch)
treef1f135514b4e09135beec7ef7d52c46578aa3cf4 /common/nextpnr.h
parentda33da5bc20bab57f90cf2579a28deb171d5ecef (diff)
downloadnextpnr-330d393c59f331178865ce34b68d654766d36289.tar.gz
nextpnr-330d393c59f331178865ce34b68d654766d36289.tar.bz2
nextpnr-330d393c59f331178865ce34b68d654766d36289.zip
Fixing regression due to IDStrings
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r--common/nextpnr.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h
index d1314c27..8acb1554 100644
--- a/common/nextpnr.h
+++ b/common/nextpnr.h
@@ -98,6 +98,13 @@ struct IdString
bool operator==(const std::string &s) const { return str() == s; }
bool operator==(const char *s) const { return str() == s; }
+ bool operator!=(const IdString &other) const
+ {
+ return index != other.index;
+ }
+ bool operator!=(const std::string &s) const { return str() != s; }
+ bool operator!=(const char *s) const { return str() != s; }
+
size_t size() const { return str().size(); }
bool empty() const { return index == 0; }
};