1
0
Fork 0
flightgear/src/GUI/MessageBox.hxx
Florent Rougon 9e6a3ebc6b Make fatalMessageBox() end with std::abort() and declare it [[noreturn]]
Many places calling fatalMessageBox() assume it doesn't return, so make
it behave this way. See discussion around:

  https://sourceforge.net/p/flightgear/mailman/message/35766691/

for some context.
2017-04-08 14:34:26 +02:00

26 lines
529 B
C++

#ifndef FG_GUI_MESSAGE_BOX_HXX
#define FG_GUI_MESSAGE_BOX_HXX
#include <string>
namespace flightgear
{
enum MessageBoxResult
{
MSG_BOX_OK,
MSG_BOX_YES,
MSG_BOX_NO
};
MessageBoxResult modalMessageBox(const std::string& caption,
const std::string& msg,
const std::string& moreText = std::string());
[[noreturn]] void fatalMessageBox(const std::string& caption,
const std::string& msg,
const std::string& moreText = std::string());
} // of namespace flightgear
#endif // of FG_GUI_MESSAGE_BOX_HXX