From 327a5d42b6b396f1c210f1579d03a0806a261d84 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 31 Dec 2014 22:50:08 +0100 Subject: Progress in memory_bram --- kernel/rtlil.h | 10 +++++----- kernel/yosys.h | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'kernel') diff --git a/kernel/rtlil.h b/kernel/rtlil.h index c40af88aa..7618780b0 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -250,14 +250,14 @@ namespace RTLIL // of cell types). the following functions helps with that. template - bool in(T first, Args... rest) { + bool in(T first, Args... rest) const { return in(first) || in(rest...); } - bool in(IdString rhs) { return *this == rhs; } - bool in(const char *rhs) { return *this == rhs; } - bool in(const std::string &rhs) { return *this == rhs; } - bool in(const pool &rhs) { return rhs.count(*this) != 0; } + bool in(IdString rhs) const { return *this == rhs; } + bool in(const char *rhs) const { return *this == rhs; } + bool in(const std::string &rhs) const { return *this == rhs; } + bool in(const pool &rhs) const { return rhs.count(*this) != 0; } }; static inline std::string escape_id(std::string str) { diff --git a/kernel/yosys.h b/kernel/yosys.h index 88f060a52..d1e01b19c 100644 --- a/kernel/yosys.h +++ b/kernel/yosys.h @@ -137,6 +137,8 @@ YOSYS_NAMESPACE_BEGIN using std::vector; using std::string; +using std::pair; + using hashlib::mkhash; using hashlib::mkhash_init; using hashlib::mkhash_add; @@ -221,6 +223,8 @@ YOSYS_NAMESPACE_END YOSYS_NAMESPACE_BEGIN +using RTLIL::State; + namespace hashlib { template<> struct hash_ops : hash_ops {}; } -- cgit v1.2.3