techmap: Replace naughty `const_cast<>()`s.

Co-Authored-By: Eddie Hung <eddie@fpgeh.com>
This commit is contained in:
Alberto Gonzalez 2020-04-21 17:47:00 +00:00
parent 97fd304cbe
commit e173291649
No known key found for this signature in database
GPG Key ID: 8395A8BA109708B2
1 changed files with 4 additions and 2 deletions

View File

@ -413,8 +413,10 @@ struct TechmapWorker
if (autopurge) {
autopurge_ports.push_back(conn.first);
} else {
apply_prefix(cell->name, const_cast<RTLIL::SigSpec&>(conn.second), module);
port_signal_map.apply(const_cast<RTLIL::SigSpec&>(conn.second));
RTLIL::SigSpec new_conn = conn.second;
apply_prefix(cell->name, new_conn, module);
port_signal_map.apply(new_conn);
c->setPort(conn.first, std::move(new_conn));
}
}