mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 21:45:34 +08:00
refactor: Fix cppcoreguidelines-init-variables warnings
This commit is contained in:
@@ -224,6 +224,7 @@ namespace swift::misc
|
||||
template <typename F>
|
||||
static CWorker *fromTask(QObject *owner, const QString &name, F &&task)
|
||||
{
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-init-variables)
|
||||
int typeId = qMetaTypeId<std::decay_t<decltype(std::forward<F>(task)())>>();
|
||||
return fromTaskImpl(owner, name, typeId, [task = std::forward<F>(task)]() mutable {
|
||||
if constexpr (std::is_void_v<decltype(task())>)
|
||||
|
||||
Reference in New Issue
Block a user