We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77aeb76 commit 38d3c3eCopy full SHA for 38d3c3e
lib/icingadb/icingadb-objects.cpp
@@ -402,7 +402,15 @@ void IcingaDB::UpdateAllConfigObjects()
402
upqObjectType.Enqueue([&]() {
403
for (auto& hMSet : source.second) {
404
for (decltype(hMSet.size()) i = 0, stop = hMSet.size() - 1u; i < stop; i += 2u) {
405
- dest.emplace(std::move(hMSet[i]), std::move(hMSet[i + 1u]));
+ auto variantToString = [](std::variant<const char*, String> v) {
406
+ if (auto str (std::get_if<String>(&v)); str) {
407
+ return std::move(*str);
408
+ }
409
+
410
+ return std::get<const char*>(v);
411
+ };
412
413
+ dest.emplace(variantToString(std::move(hMSet[i])), variantToString(std::move(hMSet[i + 1u])));
414
}
415
416
hMSet.clear();
0 commit comments