Switched DSL error handling from const char* to string_view
This allows us to get rid of a lot of .c_str()'s.
Change-Id: I09102f90d69620614dc5a7a2ebc64bd3e9b1c437
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445816
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/src/sksl/SkSLCompiler.cpp b/src/sksl/SkSLCompiler.cpp
index 0fc1b9a..11cb7a5 100644
--- a/src/sksl/SkSLCompiler.cpp
+++ b/src/sksl/SkSLCompiler.cpp
@@ -952,7 +952,7 @@
#endif // defined(SKSL_STANDALONE) || SK_SUPPORT_GPU
-void Compiler::handleError(const char* msg, PositionInfo pos) {
+void Compiler::handleError(skstd::string_view msg, PositionInfo pos) {
fErrorText += "error: " + (pos.line() >= 1 ? to_string(pos.line()) + ": " : "") + msg + "\n";
}