mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Just accept const char ptr in ImGuiColorTextEdit.
This commit is contained in:
@@ -416,11 +416,11 @@ void View::SetTextEditorFile( const char* fileName, int line )
|
||||
fseek( f, 0, SEEK_END );
|
||||
const auto sz = ftell( f );
|
||||
fseek( f, 0, SEEK_SET );
|
||||
std::string data;
|
||||
data.resize( sz );
|
||||
fread( data.data(), 1, sz, f );
|
||||
auto data = new char[sz];
|
||||
fread( data, 1, sz, f );
|
||||
fclose( f );
|
||||
m_textEditor->SetText( data );
|
||||
delete[] data;
|
||||
}
|
||||
|
||||
m_textEditor->SetCursorPosition( TextEditor::Coordinates( line-1, 0 ) );
|
||||
|
||||
Reference in New Issue
Block a user