summaryrefslogtreecommitdiffhomepage
path: root/options/group.cpp
diff options
context:
space:
mode:
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