diff options
Diffstat (limited to 'source/slang/diagnostics.cpp')
| -rw-r--r-- | source/slang/diagnostics.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/diagnostics.cpp b/source/slang/diagnostics.cpp index f1d0b63f9..4000fd967 100644 --- a/source/slang/diagnostics.cpp +++ b/source/slang/diagnostics.cpp @@ -237,13 +237,13 @@ void DiagnosticSink::diagnoseImpl(SourceLoc const& pos, DiagnosticInfo const& in } // Did the client supply a callback for us to use? - if( callback ) + if( writer ) { // If so, pass the error string along to them StringBuilder messageBuilder; formatDiagnostic(this, messageBuilder, diagnostic); - callback(messageBuilder.ProduceString().begin(), callbackUserData); + writer->write(messageBuilder.Buffer(), messageBuilder.Length()); } else { @@ -269,10 +269,10 @@ void DiagnosticSink::diagnoseRaw( } // Did the client supply a callback for us to use? - if( callback ) + if(writer) { // If so, pass the error string along to them - callback(message, callbackUserData); + writer->write(message, ::strlen(message)); } else { |
