mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
refactor: Fix clang-tidy modernize-return-braced-init-list
This commit is contained in:
@@ -259,16 +259,16 @@ namespace swift::core
|
||||
|
||||
CGlobalSetup CApplication::getGlobalSetup() const
|
||||
{
|
||||
if (m_shutdown) { return CGlobalSetup(); }
|
||||
if (m_shutdown) { return {}; }
|
||||
const CSetupReader *r = m_setupReader.data();
|
||||
if (!r) { return CGlobalSetup(); }
|
||||
if (!r) { return {}; }
|
||||
return r->getSetup();
|
||||
}
|
||||
|
||||
CUpdateInfo CApplication::getUpdateInfo() const
|
||||
{
|
||||
if (m_shutdown) { return CUpdateInfo(); }
|
||||
if (!m_gitHubPackagesReader) { return CUpdateInfo(); }
|
||||
if (m_shutdown) { return {}; }
|
||||
if (!m_gitHubPackagesReader) { return {}; }
|
||||
return m_gitHubPackagesReader->getUpdateInfo();
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ namespace swift::core
|
||||
|
||||
CStatusMessage CApplication::initLocalSettings()
|
||||
{
|
||||
if (m_localSettingsLoaded) { return CStatusMessage(); }
|
||||
if (m_localSettingsLoaded) { return {}; }
|
||||
m_localSettingsLoaded = true;
|
||||
|
||||
// trigger loading and saving of settings in appropriate scenarios
|
||||
@@ -427,7 +427,7 @@ namespace swift::core
|
||||
// sent to swiftcore and saved by swiftcore.
|
||||
CSettingsCache::instance()->enableLocalSave();
|
||||
}
|
||||
return CStatusMessage();
|
||||
return {};
|
||||
}
|
||||
|
||||
bool CApplication::hasUnsavedSettings() const { return !this->getUnsavedSettingsKeys().isEmpty(); }
|
||||
@@ -442,7 +442,7 @@ namespace swift::core
|
||||
|
||||
CStatusMessage CApplication::saveSettingsByKey(const QStringList &keys)
|
||||
{
|
||||
if (keys.isEmpty()) { return CStatusMessage(); }
|
||||
if (keys.isEmpty()) { return {}; }
|
||||
return this->supportsContexts() ? this->getIContextApplication()->saveSettingsByKey(keys) :
|
||||
CSettingsCache::instance()->saveToStore(keys);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user