diff options
author | David Shah <davey1576@gmail.com> | 2018-06-18 12:20:06 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-18 12:20:06 +0200 |
commit | ef2d0d2cb9e149839b1cba746624becae4d7c5df (patch) | |
tree | daa6b4d559bf43f043de7e18e7e5dd8a82dfbc9a /ice40 | |
parent | a965b91321fd22eb2b2e99d17abdeb419a31512d (diff) | |
download | nextpnr-ef2d0d2cb9e149839b1cba746624becae4d7c5df.tar.gz nextpnr-ef2d0d2cb9e149839b1cba746624becae4d7c5df.tar.bz2 nextpnr-ef2d0d2cb9e149839b1cba746624becae4d7c5df.zip |
Fix hash specialisation for BelType and warnings in place_sa.cc
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40')
-rw-r--r-- | ice40/chip.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ice40/chip.h b/ice40/chip.h index 9d647756..d3eb7c70 100644 --- a/ice40/chip.h +++ b/ice40/chip.h @@ -743,4 +743,15 @@ struct Chip NEXTPNR_NAMESPACE_END +namespace std { +template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelType> +{ + std::size_t operator()(NEXTPNR_NAMESPACE_PREFIX BelType bt) const + noexcept + { + return std::hash<int>()(int(bt)); + } +}; +} // namespace std + #endif |