remove outdated code

substr cannot throw bad_lexical_cast
This commit is contained in:
gfgtdf 2018-08-12 23:25:14 +02:00
parent 1646a7b906
commit e90f0fce13

View file

@ -749,11 +749,7 @@ static terrain_code string_to_number_(std::string str, std::string& start_positi
// Split if we have 1 space inside
std::size_t offset = str.find(' ', begin);
if(offset < end) {
try {
start_position = str.substr(begin, offset - begin);
} catch(const bad_lexical_cast&) {
return VOID_TERRAIN;
}
start_position = str.substr(begin, offset - begin);
begin = offset + 1;
}