Browse Source

video_core/ast: Make ShowCurrentState() take a string_view instead of std::string

Allows the function to be non-allocating in terms of the output string.
nce_cpp
Lioncash 6 years ago
parent
commit
2d2dd7bf7b
  1. 2
      src/video_core/shader/ast.cpp
  2. 2
      src/video_core/shader/ast.h

2
src/video_core/shader/ast.cpp

@ -549,7 +549,7 @@ bool ASTManager::DirectlyRelated(const ASTNode& first, const ASTNode& second) co
return min->GetParent() == max->GetParent();
}
void ASTManager::ShowCurrentState(std::string state) {
void ASTManager::ShowCurrentState(std::string_view state) {
LOG_CRITICAL(HW_GPU, "\nState {}:\n\n{}\n", state, Print());
SanityCheck();
}

2
src/video_core/shader/ast.h

@ -332,7 +332,7 @@ public:
void Decompile();
void ShowCurrentState(std::string state);
void ShowCurrentState(std::string_view state);
void SanityCheck();

Loading…
Cancel
Save