VERY experimental Nintendo Switch 2 emulator
C++
video_core/shader/ast: Make ShowCurrentState() and SanityCheck() const member functions
Lioncash4e7dbc49f8bc
diff --git a/src/video_core/shader/ast.cpp b/src/video_core/shader/ast.cppindex 784f8f69f7..e43aecc18d 100644--- a/src/video_core/shader/ast.cpp+++ b/src/video_core/shader/ast.cpp@@ -560,13 +560,13 @@ bool ASTManager::DirectlyRelated(const ASTNode& first, const ASTNode& second) coreturn min->GetParent() == max->GetParent();}-void ASTManager::ShowCurrentState(std::string_view state) {+void ASTManager::ShowCurrentState(std::string_view state) const {LOG_CRITICAL(HW_GPU, "\nState {}:\n\n{}\n", state, Print());SanityCheck();}-void ASTManager::SanityCheck() {- for (auto& label : labels) {+void ASTManager::SanityCheck() const {+ for (const auto& label : labels) {if (!label->GetParent()) {LOG_CRITICAL(HW_GPU, "Sanity Check Failed");}diff --git a/src/video_core/shader/ast.h b/src/video_core/shader/ast.hindex 8183ffa3f6..a2f0044ba8 100644--- a/src/video_core/shader/ast.h+++ b/src/video_core/shader/ast.h@@ -332,9 +332,9 @@ public:void Decompile();- void ShowCurrentState(std::string_view state);+ void ShowCurrentState(std::string_view state) const;- void SanityCheck();+ void SanityCheck() const;void Clear();