From bf607341da16cb86243e574c955fc593fe60031f Mon Sep 17 00:00:00 2001 From: "Mario J. Rugiero" Date: Sat, 20 Dec 2014 00:53:53 -0300 Subject: addMatching and insertFromParent functions from FocusableList now avoid copying m_parent->clientList() and use a const reference instead. --- src/FocusableList.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FocusableList.cc b/src/FocusableList.cc index 0850943..3689283 100644 --- a/src/FocusableList.cc +++ b/src/FocusableList.cc @@ -164,7 +164,7 @@ void FocusableList::checkUpdate(Focusable &win) { // returns whether or not the window was moved bool FocusableList::insertFromParent(Focusable &win) { - const Focusables list = m_parent->clientList(); + const Focusables &list = m_parent->clientList(); Focusables::const_iterator p_it = list.begin(), p_it_end = list.end(); Focusables::iterator our_it = m_list.begin(), our_it_end = m_list.end(); // walk through our list looking for corresponding entries in @@ -189,7 +189,7 @@ void FocusableList::addMatching() { if (!m_parent) return; - const Focusables list = m_parent->clientList(); + const Focusables &list = m_parent->clientList(); Focusables::const_iterator it = list.begin(), it_end = list.end(); for (; it != it_end; ++it) { if (m_pat->match(**it)) { -- cgit v0.11.2