From 5a0a9c7449f4f264fae8619d3881c6c0e09865ef Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 5 Oct 2019 08:45:28 -0400 Subject: video_core/ast: Replace std::string with a constexpr std::string_view Same behavior, but without the need to heap allocate --- src/video_core/shader/ast.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/video_core/shader/ast.cpp') 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: std::string tabs_memo{}; u32 memo_scope{}; - static std::string tabs; + static constexpr std::string_view tabs{" "}; }; -std::string ASTPrinter::tabs = " "; - std::string ASTManager::Print() { ASTPrinter printer{}; printer.Visit(main_node); -- cgit v1.2.3