mirror of https://github.com/YosysHQ/yosys.git
kernel: pass-by-value into Design::scratchpad_set_string() too
This commit is contained in:
parent
6ca7844cec
commit
348e892314
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue