The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
make_enum.cpp
Go to the documentation of this file.
1 #include "utils/make_enum.hpp"
2 #include "wml_exception.hpp"
3 #include "game_config.hpp"
4 
5 namespace make_enum_detail
6 {
7  void debug_conversion_error(const std::string& temp, const bad_enum_cast & e)
8  {
9  if (!temp.empty() && game_config::debug) {
10  FAIL( e.what() );
11  }
12  }
13 }
14 
Add a special kind of assert to validate whether the input from WML doesn't contain any problems that...
const char * what() const
Definition: make_enum.hpp:103
void debug_conversion_error(const std::string &temp, const bad_enum_cast &e)
Definition: make_enum.cpp:7
#define e
#define FAIL(message)
Defines the MAKE_ENUM macro.
GLsizei const GLcharARB ** string
Definition: glew.h:4503