diff options
author | Lioncash <mathew1800@gmail.com> | 2019-10-05 08:45:28 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-10-05 09:14:26 -0400 |
commit | 5a0a9c7449f4f264fae8619d3881c6c0e09865ef (patch) | |
tree | 8b29ca703d4a4edfd4047cb08f40ffac3d1b8bb6 /src/video_core/shader/ast.cpp | |
parent | 3a20d9734fa8996434895bc3d27e4b255ae98bea (diff) |
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/shader/ast.cpp')
-rw-r--r-- | src/video_core/shader/ast.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/video_core/shader/ast.cpp b/src/video_core/shader/ast.cpp index 2627c563c4..f2ab0cc00a 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); |