From f2ea245f1dfc7c4941143db49ae81b8fceefea8c Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Sat, 3 Oct 2009 13:38:41 +0200 Subject: compile fixes for sun compiler 5.10: complains about 'not beeing able to initialize this from that' --- src/FbTk/Signal.hh | 2 +- src/MinOverlapPlacement.cc | 7 ++++--- src/Window.cc | 5 +++-- src/fluxbox.cc | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/FbTk/Signal.hh b/src/FbTk/Signal.hh index df30cda..7ad4d00 100644 --- a/src/FbTk/Signal.hh +++ b/src/FbTk/Signal.hh @@ -203,7 +203,7 @@ public: /// @return A tracking ID ( not unique ) template TrackID join(Signal& sig, const Functor& functor) { - ValueType value = std::make_pair(&sig, sig.connect(functor)); + ValueType value = ValueType(&sig, sig.connect(functor)); std::pair ret = m_connections.insert(value); if ( !ret.second ) { // failed to insert this functor 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, // at the end, we'll find the one with minimum overlap // the size of this set is at most 2(n+2)(n+1) (n = number of windows) // finding overlaps is therefore O(n^3), but it can probably be improved - std::list::const_reverse_iterator it = windowlist.rbegin(), - it_end = windowlist.rend(); + const std::list& const_windowlist = windowlist; + std::list::const_reverse_iterator it = const_windowlist.rbegin(), + it_end = const_windowlist.rend(); for (; it != it_end; ++it) { if (*it == &win) continue; @@ -154,7 +155,7 @@ bool MinOverlapPlacement::placeWindow(const FluxboxWindow &win, int head, for (; reg_it != region_set.end(); ++reg_it) { int overlap = 0; - it = windowlist.rbegin(); + it = const_windowlist.rbegin(); for (; it != it_end; ++it) { // get the dimensions of the window diff --git a/src/Window.cc b/src/Window.cc index dc4015a..2d4f85a 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -187,8 +187,9 @@ void lowerFluxboxWindow(FluxboxWindow &win) { win.screen().layerManager().lock(); // lower the windows from the top down, so they don't change stacking order - WinClient::TransientList::const_reverse_iterator it = win.winClient().transientList().rbegin(); - WinClient::TransientList::const_reverse_iterator it_end = win.winClient().transientList().rend(); + const WinClient::TransientList& transients = win.winClient().transientList(); + WinClient::TransientList::const_reverse_iterator it = transients.rbegin(); + WinClient::TransientList::const_reverse_iterator it_end = transients.rend(); for (; it != it_end; ++it) { if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic()) // TODO: should we also check if it is the active client? diff --git a/src/fluxbox.cc b/src/fluxbox.cc index f44f8aa..108e400 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -1204,7 +1204,7 @@ void Fluxbox::saveWindowSearchGroup(Window window, FluxboxWindow *data) { } void Fluxbox::saveGroupSearch(Window window, WinClient *data) { - m_group_search.insert(pair(window, data)); + m_group_search.insert(pair(window, data)); } -- cgit v0.11.2