Skip to content
Snippets Groups Projects
Commit 8488a1e7 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[stuff.common.logging] use BOOST_FOREACH to comply with gcc-4.4

parent f12ba863
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "string.hh" #include "string.hh"
#include <boost/range/adaptors.hpp> #include <boost/range/adaptors.hpp>
#include <boost/foreach.hpp>
namespace Dune { namespace Dune {
namespace Stuff { namespace Stuff {
...@@ -42,7 +43,8 @@ public: ...@@ -42,7 +43,8 @@ public:
~Logging() ~Logging()
{ {
// destroy in reverse creation order, 2012 style // destroy in reverse creation order, 2012 style
for (auto id : boost::adaptors::reverse(streamIDs_)) { BOOST_REVERSE_FOREACH(auto id, streamIDs_)
{
// logstream dtor is mandated to flush itself // logstream dtor is mandated to flush itself
delete streammap_[id]; delete streammap_[id];
streammap_[id] = 0; streammap_[id] = 0;
...@@ -203,8 +205,9 @@ public: ...@@ -203,8 +205,9 @@ public:
void flush() void flush()
{ {
for (auto pair : streammap_) BOOST_FOREACH (auto pair, streammap_) {
pair.second->flush(); pair.second->flush();
}
} // Flush } // Flush
int addStream(LogFlags flags) int addStream(LogFlags flags)
...@@ -221,14 +224,16 @@ public: ...@@ -221,14 +224,16 @@ public:
void resume(LogStream::PriorityType prio = LogStream::default_suspend_priority) void resume(LogStream::PriorityType prio = LogStream::default_suspend_priority)
{ {
for (auto pair : streammap_) BOOST_FOREACH (auto pair, streammap_) {
pair.second->resume(prio); pair.second->resume(prio);
}
} // Resume } // Resume
void suspend(LogStream::PriorityType prio = LogStream::default_suspend_priority) void suspend(LogStream::PriorityType prio = LogStream::default_suspend_priority)
{ {
for (auto pair : streammap_) BOOST_FOREACH (auto pair, streammap_) {
pair.second->suspend(prio); pair.second->suspend(prio);
}
} // Suspend } // Suspend
struct SuspendLocal struct SuspendLocal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment