diff options
| author | 2019-10-17 20:59:46 -0400 | |
|---|---|---|
| committer | 2019-10-17 20:59:48 -0400 | |
| commit | 074b38b7a918a52f9085490f0da44b6e0dc23639 (patch) | |
| tree | aa50ef01406e848d63c8ba061a6864775db18f18 /src | |
| parent | video_core/shader/ast: Make ASTManager::Print a const member function (diff) | |
| download | yuzu-074b38b7a918a52f9085490f0da44b6e0dc23639.tar.gz yuzu-074b38b7a918a52f9085490f0da44b6e0dc23639.tar.xz yuzu-074b38b7a918a52f9085490f0da44b6e0dc23639.zip | |
video_core/shader/ast: Make ShowCurrentState() and SanityCheck() const member functions
These can also trivially be made const member functions, with the
addition of a few consts.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/shader/ast.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/shader/ast.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/shader/ast.cpp b/src/video_core/shader/ast.cpp index 784f8f69f..e43aecc18 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) co | |||
| 560 | return min->GetParent() == max->GetParent(); | 560 | return min->GetParent() == max->GetParent(); |
| 561 | } | 561 | } |
| 562 | 562 | ||
| 563 | void ASTManager::ShowCurrentState(std::string_view state) { | 563 | void ASTManager::ShowCurrentState(std::string_view state) const { |
| 564 | LOG_CRITICAL(HW_GPU, "\nState {}:\n\n{}\n", state, Print()); | 564 | LOG_CRITICAL(HW_GPU, "\nState {}:\n\n{}\n", state, Print()); |
| 565 | SanityCheck(); | 565 | SanityCheck(); |
| 566 | } | 566 | } |
| 567 | 567 | ||
| 568 | void ASTManager::SanityCheck() { | 568 | void ASTManager::SanityCheck() const { |
| 569 | for (auto& label : labels) { | 569 | for (const auto& label : labels) { |
| 570 | if (!label->GetParent()) { | 570 | if (!label->GetParent()) { |
| 571 | LOG_CRITICAL(HW_GPU, "Sanity Check Failed"); | 571 | LOG_CRITICAL(HW_GPU, "Sanity Check Failed"); |
| 572 | } | 572 | } |
diff --git a/src/video_core/shader/ast.h b/src/video_core/shader/ast.h index 8183ffa3f..a2f0044ba 100644 --- a/src/video_core/shader/ast.h +++ b/src/video_core/shader/ast.h | |||
| @@ -332,9 +332,9 @@ public: | |||
| 332 | 332 | ||
| 333 | void Decompile(); | 333 | void Decompile(); |
| 334 | 334 | ||
| 335 | void ShowCurrentState(std::string_view state); | 335 | void ShowCurrentState(std::string_view state) const; |
| 336 | 336 | ||
| 337 | void SanityCheck(); | 337 | void SanityCheck() const; |
| 338 | 338 | ||
| 339 | void Clear(); | 339 | void Clear(); |
| 340 | 340 | ||