Reset tools when empty string provided
This commit is contained in:
parent
cd16957f7d
commit
4e8beb0c53
1 changed files with 4 additions and 0 deletions
|
@ -1775,6 +1775,10 @@ common_params_tools::common_params_tools(std::string tools, std::string choice)
|
|||
}
|
||||
|
||||
void common_params_tools::tools(std::string tools) {
|
||||
if (tools.empty()) {
|
||||
tools_.reset();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
tools_ = std::make_shared<json>(json::parse(tools));
|
||||
if (! tools_->is_array()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue