diff options
author | David Shah <davey1576@gmail.com> | 2018-06-12 16:04:02 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-12 16:04:02 +0200 |
commit | 330d393c59f331178865ce34b68d654766d36289 (patch) | |
tree | f1f135514b4e09135beec7ef7d52c46578aa3cf4 /common | |
parent | da33da5bc20bab57f90cf2579a28deb171d5ecef (diff) | |
download | nextpnr-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')
-rw-r--r-- | common/nextpnr.h | 7 |
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; } }; |