summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Rodrigo Locatti2020-12-07 21:55:21 -0300
committerGravatar GitHub2020-12-07 21:55:21 -0300
commit4bd74ed4c744e46d69ef07e25f90c90908904850 (patch)
treecd15db0b196f40dcf9fa01257ec050a9f33c6992 /src
parentMerge pull request #5153 from comex/xx-unix (diff)
parentast: Improve string concat readability in operator() (diff)
downloadyuzu-4bd74ed4c744e46d69ef07e25f90c90908904850.tar.gz
yuzu-4bd74ed4c744e46d69ef07e25f90c90908904850.tar.xz
yuzu-4bd74ed4c744e46d69ef07e25f90c90908904850.zip
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:
212 } 212 }
213 213
214 void operator()(const ExprPredicate& expr) { 214 void operator()(const ExprPredicate& expr) {
215 inner += "P" + std::to_string(expr.predicate); 215 inner += fmt::format("P{}", expr.predicate);
216 } 216 }
217 217
218 void operator()(const ExprCondCode& expr) { 218 void operator()(const ExprCondCode& expr) {
219 u32 cc = static_cast<u32>(expr.cc); 219 inner += fmt::format("CC{}", expr.cc);
220 inner += "CC" + std::to_string(cc);
221 } 220 }
222 221
223 void operator()(const ExprVar& expr) { 222 void operator()(const ExprVar& expr) {
224 inner += "V" + std::to_string(expr.var_index); 223 inner += fmt::format("V{}", expr.var_index);
225 } 224 }
226 225
227 void operator()(const ExprBoolean& expr) { 226 void operator()(const ExprBoolean& expr) {
@@ -229,7 +228,7 @@ public:
229 } 228 }
230 229
231 void operator()(const ExprGprEqual& expr) { 230 void operator()(const ExprGprEqual& expr) {
232 inner += "( gpr_" + std::to_string(expr.gpr) + " == " + std::to_string(expr.value) + ')'; 231 inner += fmt::format("(gpr_{} == {})", expr.gpr, expr.value);
233 } 232 }
234 233
235 const std::string& GetResult() const { 234 const std::string& GetResult() const {