mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-07 01:54:10 +00:00
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";
|
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
|
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_int(const std::string &varname, int value);
|
||||||
void scratchpad_set_bool(const std::string &varname, bool 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;
|
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;
|
bool scratchpad_get_bool(const std::string &varname, bool default_value = false) const;
|
||||||
|
|
Loading…
Reference in a new issue