summaryrefslogtreecommitdiffhomepage
path: root/options/group.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-01-16 06:02:14 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-16 07:49:13 +0100
commit1e04979c3452d4eac633677876a88f9411a1153d (patch)
tree99a126a9d2647fd25a8ef2adbab6bb84f2c97dfb /options/group.cpp
parent03d28dde1635e36508cff1f9eabc265cdb5febb9 (diff)
cruft only
Diffstat (limited to 'options/group.cpp')
-rw-r--r--options/group.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/options/group.cpp b/options/group.cpp
index af66aaf2..8a0eeb03 100644
--- a/options/group.cpp
+++ b/options/group.cpp
@@ -22,7 +22,11 @@ using namespace options::globals;
group::group(const QString& name) : name(name)
{
- if (name == "")
+ constexpr unsigned reserved_buckets = 64;
+ kvs.reserve(reserved_buckets);
+ kvs.max_load_factor(0.4375);
+
+ if (name.isEmpty())
return;
with_settings_object([&](QSettings& conf) {
@@ -35,7 +39,7 @@ group::group(const QString& name) : name(name)
void group::save() const
{
- if (name == "")
+ if (name.isEmpty())
return;
with_settings_object([&](QSettings& s) {
@@ -63,7 +67,7 @@ QVariant group::get_variant(const QString& name) const
if (it != kvs.cend())
return it->second;
- return QVariant();
+ return {};
}
} // ns options::detail