Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
(cherry-picked from commit edc57d2)
  • Loading branch information
gfgtdf committed Oct 7, 2018
1 parent 59a7934 commit 80d0ab3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game_initialization/lobby_info.cpp
Expand Up @@ -158,6 +158,11 @@ bool lobby_info::process_gamelist_diff(const config& data)
const std::string& diff_result = c[config::diff_track_attribute];

if(diff_result == "new" || diff_result == "modified") {
// note: at this point (1.14.3) the server never sends a 'modified' and instead
// just sends a 'delete' followed by a 'new', it still works becasue the delete doesn't
// delete the element and just marks it as game_info::DELETED so that game_info::DELETED
// is replaced by game_info::UPDATED below. See also
// https://github.com/wesnoth/wesnoth/blob/1.14/src/server/server.cpp#L149
if(current_i == games_by_id_.end()) {
games_by_id_.emplace(game_id, game_info(c, installed_addons_));
continue;
Expand Down

1 comment on commit 80d0ab3

@soliton-
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The special config::diff_track_attribute index comes from calling config::apply_diff(..., true) not from the actual diff.

Please sign in to comment.