summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRodrigo Locatti <reinuseslisp@airmail.cc>2020-12-08 01:55:21 +0100
committerGitHub <noreply@github.com>2020-12-08 01:55:21 +0100
commit4bd74ed4c744e46d69ef07e25f90c90908904850 (patch)
treecd15db0b196f40dcf9fa01257ec050a9f33c6992 /src
parentMerge pull request #5153 from comex/xx-unix (diff)
parentast: Improve string concat readability in operator() (diff)
downloadyuzu-4bd74ed4c744e46d69ef07e25f90c90908904850.tar
yuzu-4bd74ed4c744e46d69ef07e25f90c90908904850.tar.gz
yuzu-4bd74ed4c744e46d69ef07e25f90c90908904850.tar.bz2
yuzu-4bd74ed4c744e46d69ef07e25f90c90908904850.tar.lz
yuzu-4bd74ed4c744e46d69ef07e25f90c90908904850.tar.xz
yuzu-4bd74ed4c744e46d69ef07e25f90c90908904850.tar.zst
yuzu-4bd74ed4c744e46d69ef07e25f90c90908904850.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/shader/ast.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/video_core/shader/ast.cpp b/src/video_core/shader/ast.cpp
index cc2dbe36c..db11144c7 100644
--- a/src/video_core/shader/ast.cpp
+++ b/src/video_core/shader/ast.cpp
@@ -212,16 +212,15 @@ public:
}
void operator()(const ExprPredicate& expr) {
- inner += "P" + std::to_string(expr.predicate);
+ inner += fmt::format("P{}", expr.predicate);
}
void operator()(const ExprCondCode& expr) {
- u32 cc = static_cast<u32>(expr.cc);
- inner += "CC" + std::to_string(cc);
+ inner += fmt::format("CC{}", expr.cc);
}
void operator()(const ExprVar& expr) {
- inner += "V" + std::to_string(expr.var_index);
+ inner += fmt::format("V{}", expr.var_index);
}
void operator()(const ExprBoolean& expr) {
@@ -229,7 +228,7 @@ public:
}
void operator()(const ExprGprEqual& expr) {
- inner += "( gpr_" + std::to_string(expr.gpr) + " == " + std::to_string(expr.value) + ')';
+ inner += fmt::format("(gpr_{} == {})", expr.gpr, expr.value);
}
const std::string& GetResult() const {