aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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; }
};