diff options
Diffstat (limited to 'settings.cpp')
| -rw-r--r-- | settings.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/settings.cpp b/settings.cpp index 46119905..62d928e1 100644 --- a/settings.cpp +++ b/settings.cpp @@ -249,7 +249,7 @@ template<> vector<string> Settings::Get<vector<string>>(const string& key, Ref<B string Settings::GetJson(const string& key, Ref<BinaryView> view, BNSettingsScope* scope) { - char* tmpStr = BNSettingsGetJsonString(m_object, key.c_str(), view ? view->GetObject() : nullptr, scope); + char* tmpStr = BNSettingsGetJson(m_object, key.c_str(), view ? view->GetObject() : nullptr, scope); string result(tmpStr); BNFreeString(tmpStr); return result; @@ -311,3 +311,9 @@ bool Settings::Set(const string& key, const vector<string>& value, Ref<BinaryVie BNFreeStringList(buffer, value.size()); return result; } + + +bool Settings::SetJson(const string& key, const string& value, Ref<BinaryView> view, BNSettingsScope scope) +{ + return BNSettingsSetJson(m_object, view ? view->GetObject() : nullptr, scope, key.c_str(), value.c_str()); +} |
