From 34ff85b715b377c4b2a8e30b1af8327aa7928e36 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 18 Jun 2022 10:35:48 +0200 Subject: Move out Overloads to util.h ...instead of tucking the template in filesourceinfo.cpp where it surely will be forgotten. --- lib/events/filesourceinfo.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib/events') diff --git a/lib/events/filesourceinfo.cpp b/lib/events/filesourceinfo.cpp index 11f93d80..e8b6794b 100644 --- a/lib/events/filesourceinfo.cpp +++ b/lib/events/filesourceinfo.cpp @@ -5,6 +5,7 @@ #include "filesourceinfo.h" #include "logging.h" +#include "util.h" #ifdef Quotient_E2EE_ENABLED # include "e2ee/qolmutils.h" @@ -140,14 +141,6 @@ void JsonObjectConverter::fillFrom(const QJsonObject& jo, JWK& pod) fromJson(jo.value("ext"_ls), pod.ext); } -template -struct Overloads : FunctorTs... { - using FunctorTs::operator()...; -}; - -template -Overloads(FunctorTs&&...) -> Overloads; - QUrl Quotient::getUrlFromSourceInfo(const FileSourceInfo& fsi) { return std::visit(Overloads { [](const QUrl& url) { return url; }, -- cgit v1.2.3