summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar Lioncash2019-10-05 08:45:28 -0400
committerGravatar Lioncash2019-10-05 09:14:26 -0400
commit5a0a9c7449f4f264fae8619d3881c6c0e09865ef (patch)
tree8b29ca703d4a4edfd4047cb08f40ffac3d1b8bb6 /src/video_core
parentvideo_core/ast: Default the move constructor and assignment operator (diff)
downloadyuzu-5a0a9c7449f4f264fae8619d3881c6c0e09865ef.tar.gz
yuzu-5a0a9c7449f4f264fae8619d3881c6c0e09865ef.tar.xz
yuzu-5a0a9c7449f4f264fae8619d3881c6c0e09865ef.zip
video_core/ast: Replace std::string with a constexpr std::string_view
Same behavior, but without the need to heap allocate
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/shader/ast.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/video_core/shader/ast.cpp b/src/video_core/shader/ast.cpp
index 2627c563c..f2ab0cc00 100644
--- a/src/video_core/shader/ast.cpp
+++ b/src/video_core/shader/ast.cpp
@@ -350,11 +350,9 @@ private:
350 std::string tabs_memo{}; 350 std::string tabs_memo{};
351 u32 memo_scope{}; 351 u32 memo_scope{};
352 352
353 static std::string tabs; 353 static constexpr std::string_view tabs{" "};
354}; 354};
355 355
356std::string ASTPrinter::tabs = " ";
357
358std::string ASTManager::Print() { 356std::string ASTManager::Print() {
359 ASTPrinter printer{}; 357 ASTPrinter printer{};
360 printer.Visit(main_node); 358 printer.Visit(main_node);