use const char* instead of a std::string in t_translation::error
This commit is contained in:
parent
055cf2e30f
commit
d895538c04
2 changed files with 4 additions and 3 deletions
|
@ -199,7 +199,7 @@ void gamemap::read(const std::string& data)
|
|||
} catch(t_translation::error& e) {
|
||||
// We re-throw the error but as map error.
|
||||
// Since all codepaths test for this, it's the least work.
|
||||
throw incorrect_map_format_exception(e.message.c_str());
|
||||
throw incorrect_map_format_exception(e.message);
|
||||
}
|
||||
|
||||
// Convert the starting positions to the array
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
namespace t_translation {
|
||||
|
||||
|
||||
typedef Uint32 t_layer;
|
||||
const t_layer WILDCARD = 0x2A000000;
|
||||
const t_layer NO_LAYER = 0xFFFFFFFF;
|
||||
|
@ -94,8 +95,8 @@ namespace t_translation {
|
|||
// Note: atm most thrown result in a crash, but I like
|
||||
// an uncatched exception better than an assert.
|
||||
struct error {
|
||||
error(const std::string& msg) : message(msg) {}
|
||||
std::string message;
|
||||
error(const char* msg) : message(msg) {}
|
||||
const char* const message;
|
||||
};
|
||||
|
||||
// Some types of terrain which must be known, and can't just
|
||||
|
|
Loading…
Add table
Reference in a new issue