summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/ast.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-10-18 02:06:53 +0200
committerLioncash <mathew1800@gmail.com>2019-10-18 02:26:13 +0200
commit15d177a6ac81745f473e0807faf2da634dfb0fcd (patch)
treeb781d9d324b999d1d2535cf5ee4926edbaae3dca /src/video_core/shader/ast.cpp
parentvideo_core/shader/ast: Rename Ident() to Indent() (diff)
downloadyuzu-15d177a6ac81745f473e0807faf2da634dfb0fcd.tar
yuzu-15d177a6ac81745f473e0807faf2da634dfb0fcd.tar.gz
yuzu-15d177a6ac81745f473e0807faf2da634dfb0fcd.tar.bz2
yuzu-15d177a6ac81745f473e0807faf2da634dfb0fcd.tar.lz
yuzu-15d177a6ac81745f473e0807faf2da634dfb0fcd.tar.xz
yuzu-15d177a6ac81745f473e0807faf2da634dfb0fcd.tar.zst
yuzu-15d177a6ac81745f473e0807faf2da634dfb0fcd.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/shader/ast.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/video_core/shader/ast.cpp b/src/video_core/shader/ast.cpp
index ea121e9d5..f409706cc 100644
--- a/src/video_core/shader/ast.cpp
+++ b/src/video_core/shader/ast.cpp
@@ -326,15 +326,6 @@ public:
inner += fmt::format("{}({}) -> break;\n", Indent(), expr_parser.GetResult());
}
- std::string& Indent() {
- if (memo_scope == scope) {
- return tabs_memo;
- }
- tabs_memo = tabs.substr(0, scope * 2);
- memo_scope = scope;
- return tabs_memo;
- }
-
void Visit(ASTNode& node) {
std::visit(*this, *node->GetInnerData());
}
@@ -344,6 +335,15 @@ public:
}
private:
+ std::string& Indent() {
+ if (memo_scope == scope) {
+ return tabs_memo;
+ }
+ tabs_memo = tabs.substr(0, scope * 2);
+ memo_scope = scope;
+ return tabs_memo;
+ }
+
std::string inner{};
u32 scope{};