diff --git a/lib/base/context.cpp b/lib/base/context.cpp index 2cac7a8db..996068833 100644 --- a/lib/base/context.cpp +++ b/lib/base/context.cpp @@ -6,22 +6,22 @@ using namespace icinga; -static boost::thread_specific_ptr > l_Frames; +static boost::thread_specific_ptr> l_Frames; ContextFrame::ContextFrame(const String& message) { - GetFrames().push_front(message); + GetFrames().insert(GetFrames().begin(), message); } ContextFrame::~ContextFrame() { - GetFrames().pop_front(); + GetFrames().erase(GetFrames().begin()); } -std::list& ContextFrame::GetFrames() +std::vector& ContextFrame::GetFrames() { if (!l_Frames.get()) - l_Frames.reset(new std::list()); + l_Frames.reset(new std::vector()); return *l_Frames; } diff --git a/lib/base/context.hpp b/lib/base/context.hpp index 0e4b92a78..a492a807c 100644 --- a/lib/base/context.hpp +++ b/lib/base/context.hpp @@ -5,7 +5,7 @@ #include "base/i2-base.hpp" #include "base/string.hpp" -#include +#include namespace icinga { @@ -20,7 +20,7 @@ public: size_t GetLength() const; private: - std::list m_Frames; + std::vector m_Frames; }; std::ostream& operator<<(std::ostream& stream, const ContextTrace& trace); @@ -37,7 +37,7 @@ public: ~ContextFrame(); private: - static std::list& GetFrames(); + static std::vector& GetFrames(); friend class ContextTrace; };