mirror of
https://github.com/transmission/transmission
synced 2025-02-12 09:25:03 +00:00
refactor: remove tr_variantDictFindStr from transmission-gtk (#2158)
This commit is contained in:
parent
58f13b509f
commit
932a72e61d
1 changed files with 3 additions and 3 deletions
|
@ -220,9 +220,9 @@ std::vector<std::string> gtr_pref_strv_get(tr_quark const key)
|
||||||
|
|
||||||
std::string gtr_pref_string_get(tr_quark const key)
|
std::string gtr_pref_string_get(tr_quark const key)
|
||||||
{
|
{
|
||||||
char const* str;
|
auto sv = std::string_view{};
|
||||||
|
tr_variantDictFindStrView(getPrefs(), key, &sv);
|
||||||
return tr_variantDictFindStr(getPrefs(), key, &str, nullptr) ? str : std::string();
|
return std::string{ sv };
|
||||||
}
|
}
|
||||||
|
|
||||||
void gtr_pref_string_set(tr_quark const key, std::string const& value)
|
void gtr_pref_string_set(tr_quark const key, std::string const& value)
|
||||||
|
|
Loading…
Reference in a new issue