From a139654980b2d2560667b12c886de7518ec97c40 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 12 Jun 2018 15:08:01 +0200 Subject: Add IdString API Signed-off-by: Clifford Wolf --- ice40/chip.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ice40/chip.h') diff --git a/ice40/chip.h b/ice40/chip.h index 96416c04..73e8d33b 100644 --- a/ice40/chip.h +++ b/ice40/chip.h @@ -217,7 +217,8 @@ NEXTPNR_NAMESPACE_END namespace std { template <> struct hash { - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelId &bel) const noexcept + std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelId &bel) const + noexcept { return bel.index; } @@ -225,7 +226,8 @@ template <> struct hash template <> struct hash { - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX WireId &wire) const noexcept + std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX WireId &wire) const + noexcept { return wire.index; } @@ -233,7 +235,8 @@ template <> struct hash template <> struct hash { - std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PipId &wire) const noexcept + std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PipId &wire) const + noexcept { return wire.index; } -- cgit v1.2.3