VERY experimental Nintendo Switch 2 emulator
C++
video_core/shader/ast: Make ASTManager::Print a const member function
Lioncash4f4bfa044829
diff --git a/src/video_core/shader/ast.cpp b/src/video_core/shader/ast.cppindex c7d471d507..784f8f69f7 100644--- a/src/video_core/shader/ast.cpp+++ b/src/video_core/shader/ast.cpp@@ -333,7 +333,7 @@ public:inner += fmt::format("{}({}) -> break;\n", Indent(), expr_parser.GetResult());}- void Visit(ASTNode& node) {+ void Visit(const ASTNode& node) {std::visit(*this, *node->GetInnerData());}@@ -364,7 +364,7 @@ private:static constexpr std::string_view spaces{" "};};-std::string ASTManager::Print() {+std::string ASTManager::Print() const {ASTPrinter printer{};printer.Visit(main_node);return printer.GetResult();diff --git a/src/video_core/shader/ast.h b/src/video_core/shader/ast.hindex d7bf118216..8183ffa3f6 100644--- a/src/video_core/shader/ast.h+++ b/src/video_core/shader/ast.h@@ -328,7 +328,7 @@ public:void InsertReturn(Expr condition, bool kills);- std::string Print();+ std::string Print() const;void Decompile();