File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,9 @@ class Chain
363
363
virtual bool updateRwSetting (const std::string& name, const SettingsUpdate& update_function) = 0;
364
364
365
365
// ! Replace a setting in <datadir>/settings.json with a new value.
366
+ // ! Null can be passed to erase the setting.
367
+ // ! This method provides a simpler alternative to updateRwSetting when
368
+ // ! atomically reading and updating the setting is not required.
366
369
virtual bool overwriteRwSetting (const std::string& name, common::SettingsValue value, SettingsAction action = SettingsAction::WRITE) = 0;
367
370
368
371
// ! Delete a given setting in <datadir>/settings.json.
Original file line number Diff line number Diff line change @@ -834,7 +834,6 @@ class ChainImpl : public Chain
834
834
}
835
835
bool overwriteRwSetting (const std::string& name, common::SettingsValue value, interfaces::SettingsAction action) override
836
836
{
837
- if (value.isNull ()) return deleteRwSettings (name, action);
838
837
return updateRwSetting (name, [&](common::SettingsValue& settings) {
839
838
settings = std::move (value);
840
839
return action;
You can’t perform that action at this time.
0 commit comments