compile fixes for sun compiler 5.10: complains about 'not beeing able to initialize this from that'

This commit is contained in:
Mathias Gumz 2009-10-03 13:38:41 +02:00
parent 0f299ceecd
commit f2ea245f1d
4 changed files with 9 additions and 7 deletions

View file

@ -203,7 +203,7 @@ public:
/// @return A tracking ID ( not unique ) /// @return A tracking ID ( not unique )
template <typename Signal, typename Functor> template <typename Signal, typename Functor>
TrackID join(Signal& sig, const Functor& 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); std::pair<TrackID, bool> ret = m_connections.insert(value);
if ( !ret.second ) { if ( !ret.second ) {
// failed to insert this functor // failed to insert this functor

View file

@ -79,8 +79,9 @@ bool MinOverlapPlacement::placeWindow(const FluxboxWindow &win, int head,
// at the end, we'll find the one with minimum overlap // 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) // 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 // finding overlaps is therefore O(n^3), but it can probably be improved
std::list<FluxboxWindow *>::const_reverse_iterator it = windowlist.rbegin(), const std::list<FluxboxWindow* >& const_windowlist = windowlist;
it_end = windowlist.rend(); std::list<FluxboxWindow *>::const_reverse_iterator it = const_windowlist.rbegin(),
it_end = const_windowlist.rend();
for (; it != it_end; ++it) { for (; it != it_end; ++it) {
if (*it == &win) continue; if (*it == &win) continue;
@ -154,7 +155,7 @@ bool MinOverlapPlacement::placeWindow(const FluxboxWindow &win, int head,
for (; reg_it != region_set.end(); ++reg_it) { for (; reg_it != region_set.end(); ++reg_it) {
int overlap = 0; int overlap = 0;
it = windowlist.rbegin(); it = const_windowlist.rbegin();
for (; it != it_end; ++it) { for (; it != it_end; ++it) {
// get the dimensions of the window // get the dimensions of the window

View file

@ -187,8 +187,9 @@ void lowerFluxboxWindow(FluxboxWindow &win) {
win.screen().layerManager().lock(); win.screen().layerManager().lock();
// lower the windows from the top down, so they don't change stacking order // lower the windows from the top down, so they don't change stacking order
WinClient::TransientList::const_reverse_iterator it = win.winClient().transientList().rbegin(); const WinClient::TransientList& transients = win.winClient().transientList();
WinClient::TransientList::const_reverse_iterator it_end = win.winClient().transientList().rend(); WinClient::TransientList::const_reverse_iterator it = transients.rbegin();
WinClient::TransientList::const_reverse_iterator it_end = transients.rend();
for (; it != it_end; ++it) { for (; it != it_end; ++it) {
if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic()) if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic())
// TODO: should we also check if it is the active client? // TODO: should we also check if it is the active client?

View file

@ -1204,7 +1204,7 @@ void Fluxbox::saveWindowSearchGroup(Window window, FluxboxWindow *data) {
} }
void Fluxbox::saveGroupSearch(Window window, WinClient *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));
} }