Skip to content

Commit

Permalink
remove outdated code
Browse files Browse the repository at this point in the history
substr cannot throw bad_lexical_cast
  • Loading branch information
gfgtdf committed Aug 13, 2018
1 parent 1646a7b commit e90f0fc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/terrain/translation.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit e90f0fc

Please sign in to comment.