3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-12 20:51:27 +00:00

Make in() variadic operator take parameters by reference so we don't copy IdStrings

Template argument deduction strips references.
This commit is contained in:
Robert O'Callahan 2025-09-02 02:43:03 +00:00 committed by Jannis Harder
parent 7daf917b51
commit ab51b60b81

View file

@ -411,7 +411,7 @@ struct RTLIL::IdString
// often one needs to check if a given IdString is part of a list (for example a list
// of cell types). the following functions helps with that.
template<typename... Args>
bool in(Args... args) const {
bool in(const Args &... args) const {
return (... || in(args));
}