1
0
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:
Bartosz Taudul
2018-08-18 01:16:15 +02:00
parent 2c7d457755
commit 69dd0b72c1
3 changed files with 9 additions and 8 deletions
+3 -3
View File
@@ -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 ) );