aboutsummaryrefslogtreecommitdiff
path: root/src/MinOverlapPlacement.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2009-10-03 11:38:41 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2009-10-03 11:38:41 (GMT)
commitf2ea245f1dfc7c4941143db49ae81b8fceefea8c (patch)
treea5ce1bdb3a3aedc77ad5eca4e5015525b5e95cdf /src/MinOverlapPlacement.cc
parent0f299ceecd8a2282f31ffc55db8721bbd16c6267 (diff)
downloadfluxbox-f2ea245f1dfc7c4941143db49ae81b8fceefea8c.zip
fluxbox-f2ea245f1dfc7c4941143db49ae81b8fceefea8c.tar.bz2
compile fixes for sun compiler 5.10: complains about 'not beeing able to initialize this from that'
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