← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/bug-1827182-sort-client-list into lp:widelands

 

Addressed your review, and one diff comment.

Diff comments:

> === modified file 'src/network/internet_gaming.cc'
> --- src/network/internet_gaming.cc	2019-05-01 20:17:37 +0000
> +++ src/network/internet_gaming.cc	2019-05-03 01:27:24 +0000
> @@ -558,7 +553,10 @@
>  					format_and_add_chat(
>  					   "", "", true, (boost::format(_("%s joined the lobby")) % inc.name).str());
>  			}
> -			clientlist_.insert(clientlist_.end(), irc.begin(), irc.end());
> +
> +			std::sort(clientlist_.begin(), clientlist_.end(),

If I don't sort them here, the list won't be alphabetically. The internet-lobby user list is sorted by column 0 (that's why I added clientsonline_list_.sort();) which is the type. But If I hand over an unsorted list, within the type sorting the names are not alphabetically.

> +						[]( const InternetClient &left, const InternetClient &right )
> +						{ return ( left.name < right.name ); } );
>  
>  			for (InternetClient& client : old) {
>  				if (client.name.size() && client.type != INTERNET_CLIENT_IRC) {


-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1827182-sort-client-list/+merge/366843
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1827182-sort-client-list into lp:widelands.


References