diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-03-02 00:26:14 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-03-02 00:26:14 +0100 |
commit | 19d2b71aa8f385fee0c4cd3aa9fdf4f2f3279749 (patch) | |
tree | 632d75ea7d1663ff003a312989704e1d2fc6e8df /options/group.cpp | |
parent | f5ce4029d6f5c0659eba8dedbd5238527867460b (diff) |
options: consistently use rvalue references
Diffstat (limited to 'options/group.cpp')
-rw-r--r-- | options/group.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/options/group.cpp b/options/group.cpp index 41655d5e..d5829008 100644 --- a/options/group.cpp +++ b/options/group.cpp @@ -50,7 +50,7 @@ void group::save() const }); } -void group::put(const QString& s, const QVariant& d) +void group::put(const QString& s, QVariant&& d) { if (d.isNull()) kvs.erase(s); @@ -58,6 +58,11 @@ void group::put(const QString& s, const QVariant& d) kvs[s] = d; } +void group::put(const QString& s, const QVariant& d) +{ + put(s, QVariant{d}); +} + bool group::contains(const QString& s) const { const auto it = kvs.find(s); |