mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-14 09:30:46 +00:00
display chat manager: convert to ranged for loop
This commit is contained in:
parent
f4f8e5e465
commit
6929ace250
|
@ -109,9 +109,9 @@ void display_chat_manager::add_chat_message(const std::time_t& time, const std::
|
|||
}
|
||||
|
||||
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,
|
||||
font::get_floating_label_rect(m->speaker_handle).h);
|
||||
for(const auto& m : chat_messages_) {
|
||||
ypos += std::max(font::get_floating_label_rect(m.handle).h,
|
||||
font::get_floating_label_rect(m.speaker_handle).h);
|
||||
}
|
||||
color_t speaker_color {255,255,255,SDL_ALPHA_OPAQUE};
|
||||
if(side >= 1) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user