13
0

reduce debug-build overhead.

This commit is contained in:
Robin Gareus 2016-04-24 17:35:21 +02:00
parent 36a928f0ae
commit 1321701189

View File

@ -2174,16 +2174,18 @@ Session::resort_routes ()
} }
#ifndef NDEBUG #ifndef NDEBUG
boost::shared_ptr<RouteList> rl = routes.reader (); if (DEBUG_ENABLED(DEBUG::Graph)) {
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { boost::shared_ptr<RouteList> rl = routes.reader ();
DEBUG_TRACE (DEBUG::Graph, string_compose ("%1 fed by ...\n", (*i)->name())); for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
DEBUG_TRACE (DEBUG::Graph, string_compose ("%1 fed by ...\n", (*i)->name()));
const Route::FedBy& fb ((*i)->fed_by()); const Route::FedBy& fb ((*i)->fed_by());
for (Route::FedBy::const_iterator f = fb.begin(); f != fb.end(); ++f) { for (Route::FedBy::const_iterator f = fb.begin(); f != fb.end(); ++f) {
boost::shared_ptr<Route> sf = f->r.lock(); boost::shared_ptr<Route> sf = f->r.lock();
if (sf) { if (sf) {
DEBUG_TRACE (DEBUG::Graph, string_compose ("\t%1 (sends only ? %2)\n", sf->name(), f->sends_only)); DEBUG_TRACE (DEBUG::Graph, string_compose ("\t%1 (sends only ? %2)\n", sf->name(), f->sends_only));
}
} }
} }
} }