]> git.tdb.fi Git - libs/core.git/blobdiff - source/debug/backtrace.h
Prefer more cache-efficient containers
[libs/core.git] / source / debug / backtrace.h
index 6ba3ad1b0d297a5b9ad9e705f2b1d6740a2f9e78..3f32ade0c4558478f633e93f02f9e9e29b261024 100644 (file)
@@ -1,15 +1,9 @@
-/* $Id$
-
-This file is part of libmspcore
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
 #ifndef MSP_DEBUG_BACKTRACE_H_
 #define MSP_DEBUG_BACKTRACE_H_
 
-#include <list>
 #include <ostream>
 #include <string>
+#include <vector>
 
 namespace Msp {
 namespace Debug {
@@ -22,16 +16,15 @@ public:
                void *address;
                std::string file;
                std::string symbol;
-
-               //StackFrame(void *a, const std::string &s): address(a), symbol(s) { }
        };
-       typedef std::list<StackFrame> FrameSeq;
 
-       const FrameSeq &get_frames() const { return frames; }
+private:
+       std::vector<StackFrame> frames;
+
+public:
+       const std::vector<StackFrame> &get_frames() const { return frames; }
 
        static Backtrace create();
-private:
-       FrameSeq frames;
 };
 
 std::ostream &operator<<(std::ostream &, const Backtrace &);