aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/rtlil.cc4
-rw-r--r--kernel/rtlil.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index baa033401..ebaaa5492 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -489,9 +489,9 @@ void RTLIL::Design::scratchpad_set_bool(const std::string &varname, bool value)
scratchpad[varname] = value ? "true" : "false";
}
-void RTLIL::Design::scratchpad_set_string(const std::string &varname, const std::string &value)
+void RTLIL::Design::scratchpad_set_string(const std::string &varname, std::string value)
{
- scratchpad[varname] = value;
+ scratchpad[varname] = std::move(value);
}
int RTLIL::Design::scratchpad_get_int(const std::string &varname, int default_value) const
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index c0f1c7fa8..7ca449f46 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -999,7 +999,7 @@ struct RTLIL::Design
void scratchpad_set_int(const std::string &varname, int value);
void scratchpad_set_bool(const std::string &varname, bool value);
- void scratchpad_set_string(const std::string &varname, const std::string &value);
+ void scratchpad_set_string(const std::string &varname, std::string value);
int scratchpad_get_int(const std::string &varname, int default_value = 0) const;
bool scratchpad_get_bool(const std::string &varname, bool default_value = false) const;