Browse Source

🔥 Delete FileErrDlg as it is now unused

pull/2252/head
Anders Jenbo 5 years ago
parent
commit
d9e33b36f4
  1. 27
      Source/appfat.cpp
  2. 1
      Source/appfat.h
  3. 5
      test/appfat_test.cpp

27
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.
*/

1
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);

5
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");

Loading…
Cancel
Save