impr: Code style improvements

This commit is contained in:
WerWolv
2023-12-27 16:33:49 +01:00
parent ec45d1f564
commit 74b5c93caf
64 changed files with 267 additions and 277 deletions

View File

@@ -108,7 +108,7 @@ namespace hex::plugin::builtin {
ui::ToastError::open(hex::format("hex.builtin.popup.error.project.load"_lang, wolv::util::toUTF8String(path)));
}
} else {
FileProvider* newProvider = static_cast<FileProvider*>(
auto newProvider = static_cast<FileProvider*>(
ImHexApi::Provider::createProvider("hex.builtin.provider.file", true)
);
@@ -116,9 +116,9 @@ namespace hex::plugin::builtin {
return;
newProvider->setPath(path);
if (!newProvider->open())
if (!newProvider->open()) {
hex::ImHexApi::Provider::remove(newProvider);
else {
} else {
EventProviderOpened::post(newProvider);
AchievementManager::unlockAchievement("hex.builtin.achievement.starting_out", "hex.builtin.achievement.starting_out.open_file.name");
}