diff options
author | Rick Altherr <kc8apf@kc8apf.net> | 2016-01-29 22:40:17 -0800 |
---|---|---|
committer | Rick Altherr <kc8apf@kc8apf.net> | 2016-01-29 23:06:40 -0800 |
commit | 9e26147ccd9c1b33aa9bd3c781f9bbb945378ae7 (patch) | |
tree | f373dbbf64b452c5b3a4aa2d026ab4658a125b4f /kernel | |
parent | 8b3f8cd22076aede76682eec0bbd57aae0c8c657 (diff) | |
download | yosys-9e26147ccd9c1b33aa9bd3c781f9bbb945378ae7.tar.gz yosys-9e26147ccd9c1b33aa9bd3c781f9bbb945378ae7.tar.bz2 yosys-9e26147ccd9c1b33aa9bd3c781f9bbb945378ae7.zip |
rtlil: change IdString comparison operators to take references instead of copies
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rtlil.h | 6 |
1 files changed, 3 insertions, 3 deletions
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. |