all repos — fluxbox @ bf607341da16cb86243e574c955fc593fe60031f

custom fork of the fluxbox windowmanager

addMatching and insertFromParent functions from FocusableList now avoid copying m_parent->clientList() and use a const reference instead.
Mario J. Rugiero mrugiero@gmail.com
commit

bf607341da16cb86243e574c955fc593fe60031f

parent

63f89cb4336a7232de84a6c0999833267d732175

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/FocusableList.ccsrc/FocusableList.cc

@@ -164,7 +164,7 @@ }

// 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)) {