summaryrefslogtreecommitdiff
path: root/source/slang
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang')
-rw-r--r--source/slang/slang-options.cpp2
-rw-r--r--source/slang/slang-preprocessor.cpp5
2 files changed, 3 insertions, 4 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index 1cb222294..e0ad2163a 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -890,7 +890,7 @@ struct OptionsParser
SLANG_RETURN_ON_FAIL(tryReadCommandLineArgumentRaw(sink, arg, &argCursor, argEnd, &includeDirStr));
}
- compileRequest->addSearchPath(String(includeDirStr).begin());
+ compileRequest->addSearchPath(includeDirStr);
}
//
// A `-o` option is used to specify a desired output file.
diff --git a/source/slang/slang-preprocessor.cpp b/source/slang/slang-preprocessor.cpp
index bc78e4d31..7bee5afd2 100644
--- a/source/slang/slang-preprocessor.cpp
+++ b/source/slang/slang-preprocessor.cpp
@@ -1051,9 +1051,8 @@ static void MaybeBeginMacroExpansion(
// We need to escape to a string
newToken.type = TokenType::StringLiteral;
- buf.appendChar('"');
- StringUtil::appendEscaped(humaneSourceLoc.pathInfo.foundPath.getUnownedSlice(), buf);
- buf.appendChar('"');
+ auto escapeHandler = StringEscapeUtil::getHandler(StringEscapeUtil::Style::Cpp);
+ StringEscapeUtil::appendQuoted(escapeHandler, humaneSourceLoc.pathInfo.foundPath.getUnownedSlice(), buf);
}
// We are going to keep the actual text in the slice pool, so it stays in scope