Else after return

This commit is contained in:
bofdahof
2024-12-24 12:57:34 +10:00
committed by Chris Hennes
parent 4bfe65b48c
commit 31825c28aa

View File

@@ -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<std::string,Base::Reference<ParameterManager>> &
@@ -3174,13 +3175,8 @@ void getOldDataLocation(std::map<std::string,std::string>& mConfig, std::vector<
*/
QString findUserHomePath(const QString& userHome)
{
if (userHome.isEmpty()) {
return getUserHome();
}
else {
return userHome;
}
}
return userHome.isEmpty() ? getUserHome() : userHome;
}
/*!
* \brief findPath