mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Use small vector.
This commit is contained in:
parent
6b589e9479
commit
b4faa0a9b9
@ -1,7 +1,7 @@
|
||||
#ifndef __TRACYEVENT_HPP__
|
||||
#define __TRACYEVENT_HPP__
|
||||
|
||||
#include <vector>
|
||||
#include "TracyVector.hpp"
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
@ -11,7 +11,7 @@ struct Event
|
||||
int64_t start;
|
||||
int64_t end;
|
||||
|
||||
std::vector<Event*> child;
|
||||
Vector<Event*> child;
|
||||
};
|
||||
|
||||
enum { EventSize = sizeof( Event ) };
|
||||
|
@ -242,7 +242,7 @@ void View::NewZone( Event* zone )
|
||||
const auto lastend = m_timeline.back()->end;
|
||||
if( lastend != -1 && lastend < zone->start )
|
||||
{
|
||||
m_timeline.emplace_back( zone );
|
||||
m_timeline.push_back( zone );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -251,7 +251,7 @@ void View::NewZone( Event* zone )
|
||||
}
|
||||
else
|
||||
{
|
||||
m_timeline.emplace_back( zone );
|
||||
m_timeline.push_back( zone );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "../common/TracyQueue.hpp"
|
||||
#include "TracyEvent.hpp"
|
||||
#include "TracySlab.hpp"
|
||||
#include "TracyVector.hpp"
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
@ -58,7 +59,7 @@ private:
|
||||
// this block must be locked
|
||||
std::mutex m_lock;
|
||||
std::vector<float> m_mbps;
|
||||
std::vector<Event*> m_timeline;
|
||||
Vector<Event*> m_timeline;
|
||||
std::unordered_map<uint64_t, std::string> m_strings;
|
||||
|
||||
// not used for vis - no need to lock
|
||||
|
Loading…
Reference in New Issue
Block a user