From d9e33b36f4eca22a5aead0d8a5d281940ee8455f Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 27 Jun 2021 16:03:17 +0200 Subject: [PATCH] :fire: Delete FileErrDlg as it is now unused --- Source/appfat.cpp | 27 --------------------------- Source/appfat.h | 1 - test/appfat_test.cpp | 5 ----- 3 files changed, 33 deletions(-) diff --git a/Source/appfat.cpp b/Source/appfat.cpp index bbb691d44..b9aee4e40 100644 --- a/Source/appfat.cpp +++ b/Source/appfat.cpp @@ -122,33 +122,6 @@ void ErrDlg(const char *title, const char *error, const char *logFilePath, int l app_fatal(nullptr); } -/** - * @brief Terminates the game with a file not found error dialog. - */ -void FileErrDlg(const char *error) -{ - char text[1024]; - - FreeDlg(); - - if (error == nullptr) - error = ""; - snprintf( - text, - sizeof(text), - _(/* TRANSLATORS: Error Message when diabdat.mpq is broken. Keep values unchanged. */ "Unable to open a required file.\n" - "\n" - "Verify that the MD5 of diabdat.mpq matches one of the following values\n" - "011bc6518e6166206231080a4440b373\n" - "68f049866b44688a7af65ba766bef75a\n" - "\n" - "The problem occurred when loading:\n%s"), - error); - - UiErrorOkDialog(_("Data File Error"), text); - app_fatal(nullptr); -} - /** * @brief Terminates the game with an insert CD error dialog. */ diff --git a/Source/appfat.h b/Source/appfat.h index 52ef8fee6..d59b6dd3d 100644 --- a/Source/appfat.h +++ b/Source/appfat.h @@ -35,7 +35,6 @@ void DrawDlg(const char *pszFmt, ...) DVL_PRINTF_ATTRIBUTE(1, 2); [[noreturn]] void assert_fail(int nLineNo, const char *pszFile, const char *pszFail); #endif [[noreturn]] void ErrDlg(const char *title, const char *error, const char *logFilePath, int logLineNr); -[[noreturn]] void FileErrDlg(const char *error); [[noreturn]] void InsertCDDlg(); [[noreturn]] void DirErrorDlg(const char *error); diff --git a/test/appfat_test.cpp b/test/appfat_test.cpp index f810f62ec..9df8782bb 100644 --- a/test/appfat_test.cpp +++ b/test/appfat_test.cpp @@ -15,11 +15,6 @@ TEST(Appfat, ErrDlg) EXPECT_EXIT(ErrDlg("Title", "Unknown error", "appfat.cpp", 7), ::testing::ExitedWithCode(1), "Unknown error\n\nThe error occurred at: appfat.cpp line 7"); } -TEST(Appfat, FileErrDlg) -{ - EXPECT_EXIT(FileErrDlg("devilution/image.cl2"), ::testing::ExitedWithCode(1), "devilution/image.cl2"); -} - TEST(Appfat, InsertCDDlg) { EXPECT_EXIT(InsertCDDlg(), ::testing::ExitedWithCode(1), "diabdat.mpq");