summaryrefslogtreecommitdiffstats
path: root/source/slang/diagnostics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/diagnostics.cpp')
-rw-r--r--source/slang/diagnostics.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/slang/diagnostics.cpp b/source/slang/diagnostics.cpp
index 4000fd967..4cad7ce94 100644
--- a/source/slang/diagnostics.cpp
+++ b/source/slang/diagnostics.cpp
@@ -263,6 +263,13 @@ void DiagnosticSink::diagnoseRaw(
Severity severity,
char const* message)
{
+ return diagnoseRaw(severity, UnownedStringSlice(message));
+}
+
+void DiagnosticSink::diagnoseRaw(
+ Severity severity,
+ const UnownedStringSlice& message)
+{
if (severity >= Severity::Error)
{
errorCount++;
@@ -272,7 +279,7 @@ void DiagnosticSink::diagnoseRaw(
if(writer)
{
// If so, pass the error string along to them
- writer->write(message, ::strlen(message));
+ writer->write(message.begin(), message.size());
}
else
{