summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRodrigo Locatti <reinuseslisp@airmail.cc>2020-12-07 21:55:21 -0300
committerGitHub <noreply@github.com>2020-12-07 21:55:21 -0300
commit4bd74ed4c744e46d69ef07e25f90c90908904850 (patch)
treecd15db0b196f40dcf9fa01257ec050a9f33c6992 /src
parentf782aecf4d130b45173d8a4a2556b13244317328 (diff)
parent45c5b084fde190336d07c01368699a6129214bdf (diff)
Merge pull request #5163 from lioncash/concat
ast: Improve string concat readability in operator()
Diffstat (limited to 'src')
-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 {