summaryrefslogtreecommitdiff
path: root/src/MinOverlapPlacement.cc
diff options
context:
space:
mode:
authorJim Ramsay <i.am@jimramsay.com>2009-10-14 01:05:49 (GMT)
committerJim Ramsay <i.am@jimramsay.com>2009-10-14 01:05:49 (GMT)
commit839ea523164caecd8c779e60539b78c2a748a81f (patch)
tree0019d04f27a1a258bc7a900e3cf77b916dca6493 /src/MinOverlapPlacement.cc
parent4d3aa646c1d1d1de4fdb31f938f6ea62fd5dd21e (diff)
parent8def80cec337a986b762cdbb5e2555c6da809353 (diff)
downloadfluxbox_lack-testing/argb.zip
fluxbox_lack-testing/argb.tar.bz2
Merge branch 'master' into argbtesting/argbargb
Conflicts: src/FbTk/FbWindow.cc
Diffstat (limited to 'src/MinOverlapPlacement.cc')
-rw-r--r--src/MinOverlapPlacement.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/MinOverlapPlacement.cc b/src/MinOverlapPlacement.cc
index cea4f51..559ff11 100644
--- a/src/MinOverlapPlacement.cc
+++ b/src/MinOverlapPlacement.cc
@@ -79,8 +79,9 @@ bool MinOverlapPlacement::placeWindow(const FluxboxWindow &win, int head,
79 // at the end, we'll find the one with minimum overlap 79 // at the end, we'll find the one with minimum overlap
80 // the size of this set is at most 2(n+2)(n+1) (n = number of windows) 80 // the size of this set is at most 2(n+2)(n+1) (n = number of windows)
81 // finding overlaps is therefore O(n^3), but it can probably be improved 81 // finding overlaps is therefore O(n^3), but it can probably be improved
82 std::list<FluxboxWindow *>::const_reverse_iterator it = windowlist.rbegin(), 82 const std::list<FluxboxWindow* >& const_windowlist = windowlist;
83 it_end = windowlist.rend(); 83 std::list<FluxboxWindow *>::const_reverse_iterator it = const_windowlist.rbegin(),
84 it_end = const_windowlist.rend();
84 for (; it != it_end; ++it) { 85 for (; it != it_end; ++it) {
85 if (*it == &win) continue; 86 if (*it == &win) continue;
86 87
@@ -154,7 +155,7 @@ bool MinOverlapPlacement::placeWindow(const FluxboxWindow &win, int head,
154 for (; reg_it != region_set.end(); ++reg_it) { 155 for (; reg_it != region_set.end(); ++reg_it) {
155 156
156 int overlap = 0; 157 int overlap = 0;
157 it = windowlist.rbegin(); 158 it = const_windowlist.rbegin();
158 for (; it != it_end; ++it) { 159 for (; it != it_end; ++it) {
159 160
160 // get the dimensions of the window 161 // get the dimensions of the window