Don't convert KIID on the fly
Converting to string on save prevent unneeded ops
(cherry picked from commit 901685f01b
)
This commit is contained in:
parent
a970acd0bc
commit
92dc06ac9d
|
@ -54,7 +54,7 @@ void LOGGER::Save( const std::string& aFilename )
|
|||
uint64_t id = 0;
|
||||
|
||||
fprintf( f, "event %d %d %d %s\n", evt.type, evt.p.x, evt.p.y,
|
||||
(const char*) evt.uuid.c_str() );
|
||||
static_cast<const char*>( evt.uuid.AsString().c_str() ) );
|
||||
}
|
||||
|
||||
fclose( f );
|
||||
|
@ -67,11 +67,11 @@ void LOGGER::Log( LOGGER::EVENT_TYPE evt, const VECTOR2I& pos, const ITEM* item
|
|||
|
||||
ent.type = evt;
|
||||
ent.p = pos;
|
||||
ent.uuid = "null";
|
||||
ent.uuid = KIID(0);
|
||||
|
||||
|
||||
if( item && item->Parent() )
|
||||
ent.uuid = item->Parent()->m_Uuid.AsString();
|
||||
ent.uuid = item->Parent()->m_Uuid;
|
||||
|
||||
m_events.push_back( ent );
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <sstream>
|
||||
|
||||
#include <math/vector2d.h>
|
||||
#include <kiid.h>
|
||||
|
||||
class SHAPE_LINE_CHAIN;
|
||||
class SHAPE;
|
||||
|
@ -51,7 +52,7 @@ public:
|
|||
struct EVENT_ENTRY {
|
||||
VECTOR2I p;
|
||||
EVENT_TYPE type;
|
||||
wxString uuid;
|
||||
KIID uuid;
|
||||
};
|
||||
|
||||
LOGGER();
|
||||
|
|
|
@ -540,7 +540,7 @@ void ROUTER_TOOL::saveRouterDebugLog()
|
|||
for( auto evt : events)
|
||||
{
|
||||
fprintf( f, "event %d %d %d %s\n", evt.p.x, evt.p.y, evt.type,
|
||||
(const char*) evt.uuid.c_str() );
|
||||
static_cast<const char*>( evt.uuid.AsString().c_str() ) );
|
||||
}
|
||||
|
||||
fclose( f );
|
||||
|
|
Loading…
Reference in New Issue