aboutsummaryrefslogtreecommitdiffstats
path: root/common/idstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/idstring.h')
-rw-r--r--common/idstring.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/common/idstring.h b/common/idstring.h
index c3ccbc6b..5a7719fa 100644
--- a/common/idstring.h
+++ b/common/idstring.h
@@ -56,18 +56,10 @@ struct IdString
bool operator!=(const IdString &other) const { return index != other.index; }
bool empty() const { return index == 0; }
+
+ unsigned int hash() const { return index; }
};
NEXTPNR_NAMESPACE_END
-namespace std {
-template <> struct hash<NEXTPNR_NAMESPACE_PREFIX IdString>
-{
- std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX IdString &obj) const noexcept
- {
- return std::hash<int>()(obj.index);
- }
-};
-} // namespace std
-
#endif /* IDSTRING_H */