summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2019-10-17 20:06:53 -0400
committerGravatar Lioncash2019-10-17 20:26:13 -0400
commit15d177a6ac81745f473e0807faf2da634dfb0fcd (patch)
treeb781d9d324b999d1d2535cf5ee4926edbaae3dca /src
parentvideo_core/shader/ast: Rename Ident() to Indent() (diff)
downloadyuzu-15d177a6ac81745f473e0807faf2da634dfb0fcd.tar.gz
yuzu-15d177a6ac81745f473e0807faf2da634dfb0fcd.tar.xz
yuzu-15d177a6ac81745f473e0807faf2da634dfb0fcd.zip
video_core/shader/ast: Make Indent() private
It's never used outside of this class, so we can narrow its scope down.
Diffstat (limited to 'src')
-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:
326 inner += fmt::format("{}({}) -> break;\n", Indent(), expr_parser.GetResult()); 326 inner += fmt::format("{}({}) -> break;\n", Indent(), expr_parser.GetResult());
327 } 327 }
328 328
329 std::string& Indent() {
330 if (memo_scope == scope) {
331 return tabs_memo;
332 }
333 tabs_memo = tabs.substr(0, scope * 2);
334 memo_scope = scope;
335 return tabs_memo;
336 }
337
338 void Visit(ASTNode& node) { 329 void Visit(ASTNode& node) {
339 std::visit(*this, *node->GetInnerData()); 330 std::visit(*this, *node->GetInnerData());
340 } 331 }
@@ -344,6 +335,15 @@ public:
344 } 335 }
345 336
346private: 337private:
338 std::string& Indent() {
339 if (memo_scope == scope) {
340 return tabs_memo;
341 }
342 tabs_memo = tabs.substr(0, scope * 2);
343 memo_scope = scope;
344 return tabs_memo;
345 }
346
347 std::string inner{}; 347 std::string inner{};
348 u32 scope{}; 348 u32 scope{};
349 349