mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-12 19:31:47 +00:00
Fast read path.
This commit is contained in:
parent
8f862b3271
commit
7e0eac78e1
@ -25,6 +25,13 @@ public:
|
||||
}
|
||||
|
||||
void Read( void* ptr, size_t size )
|
||||
{
|
||||
if( size <= BufSize - m_offset )
|
||||
{
|
||||
memcpy( ptr, m_buf[m_active] + m_offset, size );
|
||||
m_offset += size;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto dst = (char*)ptr;
|
||||
while( size > 0 )
|
||||
@ -47,6 +54,7 @@ public:
|
||||
size -= sz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
FileRead( FILE* f )
|
||||
|
Loading…
Reference in New Issue
Block a user