From 9e26147ccd9c1b33aa9bd3c781f9bbb945378ae7 Mon Sep 17 00:00:00 2001 From: Rick Altherr Date: Fri, 29 Jan 2016 22:40:17 -0800 Subject: rtlil: change IdString comparison operators to take references instead of copies --- kernel/rtlil.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kernel/rtlil.h') diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 7b669536e..0444834ac 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -192,12 +192,12 @@ namespace RTLIL return std::string(global_id_storage_.at(index_)); } - bool operator<(IdString rhs) const { + bool operator<(const IdString &rhs) const { return index_ < rhs.index_; } - bool operator==(IdString rhs) const { return index_ == rhs.index_; } - bool operator!=(IdString rhs) const { return index_ != rhs.index_; } + bool operator==(const IdString &rhs) const { return index_ == rhs.index_; } + bool operator!=(const IdString &rhs) const { return index_ != rhs.index_; } // The methods below are just convenience functions for better compatibility with std::string. -- cgit v1.2.3 From 12ebdef17c66bc5d1fc9acf6fdafac0795f872f3 Mon Sep 17 00:00:00 2001 From: Rick Altherr Date: Fri, 29 Jan 2016 22:03:12 -0800 Subject: rtlil: duplicate remove2() for std::set<> --- kernel/rtlil.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kernel/rtlil.h') diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 0444834ac..5dff5579f 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -670,6 +670,8 @@ public: void remove(const pool &pattern, RTLIL::SigSpec *other) const; void remove2(const pool &pattern, RTLIL::SigSpec *other); + void remove2(const std::set &pattern, RTLIL::SigSpec *other); + void remove(int offset, int length = 1); void remove_const(); -- cgit v1.2.3