Remove some unreachable code
This commit is contained in:
parent
8d2244628a
commit
706015ab85
2 changed files with 1 additions and 25 deletions
|
@ -100,15 +100,6 @@ void display_chat_manager::add_chat_message(const time_t& time, const std::strin
|
|||
msg = message;
|
||||
}
|
||||
|
||||
try {
|
||||
// We've had a joker who send an invalid utf-8 message to crash clients
|
||||
// so now catch the exception and ignore the message.
|
||||
//msg = my_disp_.video().faked() ? "" : font::word_wrap_text(msg,font::SIZE_NORMAL,my_disp_.map_outside_area().w*3/4);
|
||||
} catch (utf8::invalid_utf8_exception&) {
|
||||
ERR_NG << "Invalid utf-8 found, chat message is ignored." << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
int ypos = chat_message_x;
|
||||
for(std::vector<chat_message>::const_iterator m = chat_messages_.begin(); m != chat_messages_.end(); ++m) {
|
||||
ypos += std::max(font::get_floating_label_rect(m->handle).h,
|
||||
|
|
|
@ -1327,22 +1327,7 @@ color_t string_to_color(const std::string &cmp_str)
|
|||
std::vector<std::string> split_in_width(const std::string &/*s*/, const int /*font_size*/,
|
||||
const unsigned /*width*/)
|
||||
{
|
||||
std::vector<std::string> res;
|
||||
try {
|
||||
#if 0
|
||||
const std::string& first_line = font::word_wrap_text(s, font_size, width, -1, 1, true);
|
||||
res.push_back(first_line);
|
||||
if(s.size() > first_line.size()) {
|
||||
res.push_back(s.substr(first_line.size()));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
catch (utf8::invalid_utf8_exception&)
|
||||
{
|
||||
throw parse_error (_("corrupted original file"));
|
||||
}
|
||||
|
||||
return res;
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string remove_first_space(const std::string& text)
|
||||
|
|
Loading…
Add table
Reference in a new issue