fixup: clang-format and code cleanups

This commit is contained in:
B3n30 2017-09-20 17:21:02 +02:00
parent ba479ac20e
commit c9541cc906

View File

@ -222,40 +222,36 @@ static System::Integrity::Status GetArchiveStatus(const std::string& name, const
LOG_INFO(Core, "SystemCheck: %s exists.", name.c_str());
return System::Integrity::Dumped;
#ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES
} else if (settings_version == CUSTOM_ARCHIVES_VERSION) {
LOG_WARNING(Core, "SystemCheck: %s(custom) exists.", name.c_str());
return System::Integrity::Custom;
} else {
} else if (settings_version != CUSTOM_ARCHIVES_VERSION && custom_data_length) {
FileUtil::IOFile file(shared_font_path, "wb");
file.WriteBytes(custom_data, custom_data_length);
file.Close();
settings_version = CUSTOM_ARCHIVES_VERSION;
LOG_WARNING(Core, "SystemCheck: Updated %s.", name.c_str());
return System::Integrity::CreatedCustom;
#else
} else {
LOG_WARNING(Core, "SystemCheck: %s(custom) exists.", name.c_str());
return System::Integrity::Custom;
#endif
}
} else {
LOG_WARNING(Core, "SystemCheck: %s(custom) exists.", name.c_str());
return System::Integrity::Custom;
}
if (!legacy_path.empty() && FileUtil::Exists(legacy_path)) {
LOG_INFO(Core, "SystemCheck: %s(legacy) exists.", name.c_str());
return System::Integrity::DumpedLegacy;
} else {
}
LOG_ERROR(Core, "SystemCheck: %s missing.", name.c_str());
#ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES
if (custom_data_length) {
FileUtil::IOFile file(shared_font_path, "wb");
file.WriteBytes(custom_data, custom_data_length);
file.Close();
settings_version = CUSTOM_ARCHIVES_VERSION;
LOG_WARNING(Core, "SystemCheck: Created %s.", name.c_str());
return System::Integrity::CreatedCustom;
#else
return System::Integrity::Missing;
}
#endif
}
}
return System::Integrity::Missing;
}
void System::SystemIntegrityCheck() {