Skip to content

Commit

Permalink
WTHDW: Avoid un-necessary local reference to list of open windows.
Browse files Browse the repository at this point in the history
In SetActiveWindow, we have a local reference for the list of open windows.
How ever, when inserting window handle we create a new reference. This is
un-necessary and the patch fixes it.
  • Loading branch information
kalyankondapally committed Feb 19, 2014
1 parent d17f5d5 commit f30b07b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion impl/window_tree_host_delegate_wayland.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void WindowTreeHostDelegateWayland::SetActiveWindow(
unsigned window_handle = current_active_window_->window_;
if (windows.front() != window_handle) {
windows.remove(window_handle);
windows.insert(open_windows().begin(), window_handle);
windows.insert(windows.begin(), window_handle);
}

current_active_window_->Activate();
Expand Down

1 comment on commit f30b07b

@tiagovignatti
Copy link

Choose a reason for hiding this comment

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

please correct the text description to use "however" and "unnecessary" instead.

Please sign in to comment.