From 31825c28aa26562305c98482eb11428e75729ccc Mon Sep 17 00:00:00 2001 From: bofdahof <172177156+bofdahof@users.noreply.github.com> Date: Tue, 24 Dec 2024 12:57:34 +1000 Subject: [PATCH] Else after return --- src/App/Application.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 0779767728..ef114ad7d9 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -971,10 +971,13 @@ Document* Application::openDocumentPrivate(const char * FileName, } } - if(!isMainDoc) + if (!isMainDoc) { return nullptr; - else if(doc) + } + + if (doc) { return doc; + } } std::string name; @@ -1266,10 +1269,8 @@ ParameterManager & Application::GetUserParameter() ParameterManager * Application::GetParameterSet(const char* sName) const { auto it = mpcPramManager.find(sName); - if ( it != mpcPramManager.end() ) - return it->second; - else - return nullptr; + + return it != mpcPramManager.end() ? it->second : nullptr; } const std::map> & @@ -3174,13 +3175,8 @@ void getOldDataLocation(std::map& mConfig, std::vector< */ QString findUserHomePath(const QString& userHome) { - if (userHome.isEmpty()) { - return getUserHome(); - } - else { - return userHome; - } -} + return userHome.isEmpty() ? getUserHome() : userHome; + } /*! * \brief findPath