compile fixes for sun compiler 5.10: complains about 'not beeing able to initialize this from that'
Mathias Gumz akira at fluxbox dot org
4 files changed,
9 insertions(+),
7 deletions(-)
M
src/FbTk/Signal.hh
→
src/FbTk/Signal.hh
@@ -203,7 +203,7 @@ /// Starts tracking a signal.
/// @return A tracking ID ( not unique ) template <typename Signal, typename Functor> 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<TrackID, bool> ret = m_connections.insert(value); if ( !ret.second ) { // failed to insert this functor
M
src/MinOverlapPlacement.cc
→
src/MinOverlapPlacement.cc
@@ -79,8 +79,9 @@ // go through the list of windows, creating other reasonable placements
// 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<FluxboxWindow *>::const_reverse_iterator it = windowlist.rbegin(), - it_end = windowlist.rend(); + const std::list<FluxboxWindow* >& const_windowlist = windowlist; + std::list<FluxboxWindow *>::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 @@ std::set<Region>::iterator reg_it = region_set.begin();
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
M
src/Window.cc
→
src/Window.cc
@@ -187,8 +187,9 @@ if (!win.winClient().transientList().empty())
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?
M
src/fluxbox.cc
→
src/fluxbox.cc
@@ -1204,7 +1204,7 @@ m_window_search_group[window] = data;
} void Fluxbox::saveGroupSearch(Window window, WinClient *data) { - m_group_search.insert(pair<Window, WinClient *>(window, data)); + m_group_search.insert(pair<const Window, WinClient *>(window, data)); }