From 861c18b368451471c28e285511da3fb23aa524c8 Mon Sep 17 00:00:00 2001 From: Ali Alzyod Date: Sat, 23 Jul 2022 15:27:45 +0300 Subject: [PATCH 1/1] [Shader Generator] using Raw String Literal Using Raw String Literal to generate shader files. This will simplify the file layout and will fix some compilation warnings about missing terminating strings. Change-Id: I784bf595f18f9c1fb404e8e818317cc91dd19103 --- dali-toolkit/shader-generator/shader-generator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dali-toolkit/shader-generator/shader-generator.cpp b/dali-toolkit/shader-generator/shader-generator.cpp index d386fb3..a88333c 100644 --- a/dali-toolkit/shader-generator/shader-generator.cpp +++ b/dali-toolkit/shader-generator/shader-generator.cpp @@ -144,11 +144,13 @@ void GenerateHeaderFile( << endl; outFile << "const std::string_view " << shaderVariableName << endl; outFile << "{" << endl; + outFile << "R\"(" << endl; string line; while(getline(shaderFile, line)) { - outFile << "\"" << line << "\\n\"" << endl; + outFile << line << endl; } + outFile << ")\"" << endl; outFile << "};" << endl; cout << " [OK]" << endl; } -- 2.7.4