1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Use strlen instead of pointer walking in the rest of places.

This commit is contained in:
Bartosz Taudul
2024-06-16 18:20:16 +02:00
parent 9f0f3a7218
commit be40c1e38e
2 changed files with 3 additions and 6 deletions
+2 -4
View File
@@ -3638,14 +3638,12 @@ void Worker::AddSourceLocationPayload( const char* data, size_t sz )
memcpy( &color, data, 4 );
memcpy( &line, data + 4, 4 );
data += 8;
auto end = data;
auto end = data + strlen( data );
while( *end ) end++;
const auto func = StoreString( data, end - data );
end++;
data = end;
while( *end ) end++;
data = end + strlen( data );
const auto source = StoreString( data, end - data );
end++;