[Commits] [wesnoth/wesnoth] 0efd41: Lobby Info: formatting and doc update
GitHub
noreply at github.com
Tue Oct 31 09:49:58 UTC 2017
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 0efd41ade1b6f52498d090dfa5456f42e8856eee
https://github.com/wesnoth/wesnoth/commit/0efd41ade1b6f52498d090dfa5456f42e8856eee
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-10-31 (Tue, 31 Oct 2017)
Changed paths:
M src/game_initialization/lobby_info.cpp
M src/game_initialization/lobby_info.hpp
Log Message:
-----------
Lobby Info: formatting and doc update
Also deployed some std::endl in place of "\n".
Commit: 203698df5dfc94c393951561eee2777593957c0b
https://github.com/wesnoth/wesnoth/commit/203698df5dfc94c393951561eee2777593957c0b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-10-31 (Tue, 31 Oct 2017)
Changed paths:
M src/game_initialization/lobby_info.cpp
M src/game_initialization/lobby_info.hpp
M src/gui/dialogs/multiplayer/lobby.cpp
Log Message:
-----------
Lobby Info: cleanup and optimization
* Deployed auto for iterators.
* Reserve container space when appropriate to reduce unnecessary copying. This is especially
useful since the game_info class has a rather lot of stuff in it.
* Don't recreate sorted users vector every time said vector is sorted. The only time the actual
contents would change are when the source (users) change, so just populate it at that point.
* Remove the games_filtered vector. This was essentially just used to get the number of visible
games with a filter active, but boost::dynamic_bitset (games_visibility) already provides
appropriate functionality, rendering it useless.
* Removed an unnecessary inline overload. Default arguments suffice instead.
Compare: https://github.com/wesnoth/wesnoth/compare/cadbe4a2a34a...203698df5dfc
More information about the Commits
mailing list