diff options
author | Mario J. Rugiero <mrugiero@gmail.com> | 2014-12-20 03:53:53 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2015-05-01 08:46:21 (GMT) |
commit | bf607341da16cb86243e574c955fc593fe60031f (patch) | |
tree | 8dc2066b45315035dca7367f47754b603a9bd31c /src/FocusableList.cc | |
parent | 63f89cb4336a7232de84a6c0999833267d732175 (diff) | |
download | fluxbox-bf607341da16cb86243e574c955fc593fe60031f.zip fluxbox-bf607341da16cb86243e574c955fc593fe60031f.tar.bz2 |
addMatching and insertFromParent functions from FocusableList now avoid copying m_parent->clientList() and use a const reference instead.
Diffstat (limited to 'src/FocusableList.cc')
-rw-r--r-- | src/FocusableList.cc | 4 |
1 files 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) { | |||
164 | 164 | ||
165 | // returns whether or not the window was moved | 165 | // returns whether or not the window was moved |
166 | bool FocusableList::insertFromParent(Focusable &win) { | 166 | bool FocusableList::insertFromParent(Focusable &win) { |
167 | const Focusables list = m_parent->clientList(); | 167 | const Focusables &list = m_parent->clientList(); |
168 | Focusables::const_iterator p_it = list.begin(), p_it_end = list.end(); | 168 | Focusables::const_iterator p_it = list.begin(), p_it_end = list.end(); |
169 | Focusables::iterator our_it = m_list.begin(), our_it_end = m_list.end(); | 169 | Focusables::iterator our_it = m_list.begin(), our_it_end = m_list.end(); |
170 | // walk through our list looking for corresponding entries in | 170 | // walk through our list looking for corresponding entries in |
@@ -189,7 +189,7 @@ void FocusableList::addMatching() { | |||
189 | if (!m_parent) | 189 | if (!m_parent) |
190 | return; | 190 | return; |
191 | 191 | ||
192 | const Focusables list = m_parent->clientList(); | 192 | const Focusables &list = m_parent->clientList(); |
193 | Focusables::const_iterator it = list.begin(), it_end = list.end(); | 193 | Focusables::const_iterator it = list.begin(), it_end = list.end(); |
194 | for (; it != it_end; ++it) { | 194 | for (; it != it_end; ++it) { |
195 | if (m_pat->match(**it)) { | 195 | if (m_pat->match(**it)) { |