chore: reformat

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2023-08-02 18:35:35 +02:00
parent ce2ca13815
commit 1d468ac35a
594 changed files with 16040 additions and 16536 deletions

View File

@ -43,8 +43,7 @@ namespace LegacyFTB {
void PrivatePackManager::load()
{
try
{
try {
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
auto foo = QString::fromUtf8(FS::read(m_filename)).split('\n', Qt::SkipEmptyParts);
currentPacks = QSet<QString>(foo.begin(), foo.end());
@ -53,9 +52,7 @@ void PrivatePackManager::load()
#endif
dirty = false;
}
catch(...)
{
} catch (...) {
currentPacks = {};
qWarning() << "Failed to read third party FTB pack codes from" << m_filename;
}
@ -63,20 +60,16 @@ void PrivatePackManager::load()
void PrivatePackManager::save() const
{
if(!dirty)
{
if (!dirty) {
return;
}
try
{
try {
QStringList list = currentPacks.values();
FS::write(m_filename, list.join('\n').toUtf8());
dirty = false;
}
catch(...)
{
} catch (...) {
qWarning() << "Failed to write third party FTB pack codes to" << m_filename;
}
}
}
} // namespace LegacyFTB