From 0841ff7a24be4ee060e4b9629cf0398572da7875 Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Fri, 2 Oct 2026 18:26:18 +0200 Subject: [PATCH] rtlil: use twine find instead of add to avoid potentially inserting dead strings --- kernel/rtlil.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/rtlil.h b/kernel/rtlil.h index a42af354b..1809e1253 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -2040,13 +2040,13 @@ public: const RTLIL::Const &getParam(RTLIL::IdString paramname) const; template bool hasParam(N name) const - { return hasParam(module->twines().add(std::move(name))); } + { return hasParam(module->twines().find(std::string_view(name))); } template void unsetParam(N name) - { unsetParam(module->twines().add(std::move(name))); } + { unsetParam(module->twines().find(std::string_view(name))); } template void setParam(N name, RTLIL::Const value) { setParam(module->twines().add(std::move(name)), std::move(value)); } template const RTLIL::Const &getParam(N name) const - { return getParam(module->twines().add(std::move(name))); } + { return getParam(module->twines().find(std::string_view(name))); } void sort(); void check();