From df485f0a6007305979b8f52d53036983efe5d88b Mon Sep 17 00:00:00 2001
From: patrick96
Date: Thu, 3 Dec 2020 11:54:11 +0100
Subject: [PATCH] fix(module_formatter): Remove double moves
---
src/modules/meta/base.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/modules/meta/base.cpp b/src/modules/meta/base.cpp
index f03010b4..08d70fb8 100644
--- a/src/modules/meta/base.cpp
+++ b/src/modules/meta/base.cpp
@@ -140,12 +140,14 @@ namespace modules {
}
void module_formatter::add(string name, string fallback, vector&& tags, vector&& whitelist) {
- add_value(move(name), m_conf.get(m_modname, move(name), move(fallback)), forward>(tags), forward>(whitelist));
+ string value = m_conf.get(m_modname, name, move(fallback));
+ add_value(move(name), move(value), forward>(tags), forward>(whitelist));
}
void module_formatter::add_optional(string name, vector&& tags, vector&& whitelist) {
if (m_conf.has(m_modname, name)) {
- add_value(move(name), m_conf.get(m_modname, move(name)), move(tags), move(whitelist));
+ string value = m_conf.get(m_modname, name);
+ add_value(move(name), move(value), move(tags), move(whitelist));
}
}