mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-17 14:25:37 +00:00
Improve code tokenization estimation.
This commit is contained in:
@@ -856,13 +856,13 @@ std::string TracyLlmTools::SourceFile( const std::string& file, uint32_t line )
|
||||
{
|
||||
if( minLine > 0 )
|
||||
{
|
||||
size += lines[minLine].size() + 1;
|
||||
size += lines[minLine].size() * 3 + 30;
|
||||
if( size >= maxSize ) break;
|
||||
minLine--;
|
||||
}
|
||||
if( maxLine < lines.size() )
|
||||
{
|
||||
size += lines[maxLine].size() + 1;
|
||||
size += lines[maxLine].size() * 3 + 30;
|
||||
if( size >= maxSize ) break;
|
||||
maxLine++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user