From bd6b5c456c92abbb58b2e9688c9183a07171014d Mon Sep 17 00:00:00 2001 From: Mat Sutcliffe Date: Sun, 16 Aug 2020 15:27:08 +0100 Subject: [PATCH] Issue #74 Style: remove egregious redundancy in CCoreFacadeConfig --- src/blackcore/corefacadeconfig.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/blackcore/corefacadeconfig.cpp b/src/blackcore/corefacadeconfig.cpp index e49d571f2..44a8e2755 100644 --- a/src/blackcore/corefacadeconfig.cpp +++ b/src/blackcore/corefacadeconfig.cpp @@ -58,25 +58,21 @@ namespace BlackCore CCoreFacadeConfig CCoreFacadeConfig::forCoreAllLocalInDBus(const QString &dbusBootstrapAddress) { - const CCoreFacadeConfig cfg(CCoreFacadeConfig::LocalInDBusServer, dbusBootstrapAddress); - return cfg; + return { LocalInDBusServer, dbusBootstrapAddress }; } CCoreFacadeConfig CCoreFacadeConfig::local(const QString &dbusBootstrapAddress) { - const CCoreFacadeConfig cfg = CCoreFacadeConfig(CCoreFacadeConfig(CCoreFacadeConfig::Local, dbusBootstrapAddress)); - return cfg; + return { Local, dbusBootstrapAddress }; } CCoreFacadeConfig CCoreFacadeConfig::remote(const QString &dbusBootstrapAddress) { - CCoreFacadeConfig cfg = CCoreFacadeConfig(CCoreFacadeConfig(CCoreFacadeConfig::Remote, dbusBootstrapAddress)); - return cfg; + return { Remote, dbusBootstrapAddress }; } CCoreFacadeConfig CCoreFacadeConfig::allEmpty() { - CCoreFacadeConfig cfg = CCoreFacadeConfig(); - return cfg; + return {}; } } // namespace