3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 06:03:23 +00:00

kernel: Cell::set{Port,Param}() to pass by value, but use std::move

Otherwise cell->setPort(ID::A, cell->getPort(ID::B)) could be invalid
This commit is contained in:
Eddie Hung 2020-03-26 14:33:06 -07:00
parent 940640ac44
commit f97b90e40b
2 changed files with 7 additions and 7 deletions

View file

@ -1381,7 +1381,7 @@ public:
// access cell ports
bool hasPort(RTLIL::IdString portname) const;
void unsetPort(RTLIL::IdString portname);
void setPort(RTLIL::IdString portname, const RTLIL::SigSpec &signal);
void setPort(RTLIL::IdString portname, RTLIL::SigSpec signal);
const RTLIL::SigSpec &getPort(RTLIL::IdString portname) const;
const dict<RTLIL::IdString, RTLIL::SigSpec> &connections() const;
@ -1393,7 +1393,7 @@ public:
// access cell parameters
bool hasParam(RTLIL::IdString paramname) const;
void unsetParam(RTLIL::IdString paramname);
void setParam(RTLIL::IdString paramname, const RTLIL::Const& value);
void setParam(RTLIL::IdString paramname, RTLIL::Const value);
const RTLIL::Const &getParam(RTLIL::IdString paramname) const;
void sort();