mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
0bb85f6a75
Mostly fixing unused *, implicit conversion, braced scalar init, fpermissive, and some others. Some Clang errors likely remain in video_core, and std::ranges is still a pertinent issue in shader_recompiler shader_recompiler: cmake: Force bracket depth to 1024 on Clang Increases the maximum fold expression depth thread_worker: Include condition_variable Don't use list initializers in control flow Co-authored-by: ReinUsesLisp <reinuseslisp@airmail.cc>
29 lines
651 B
C++
29 lines
651 B
C++
// Copyright 2021 yuzu Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#include <string>
|
|
|
|
#include <fmt/format.h>
|
|
|
|
#include "shader_recompiler/frontend/ir/condition.h"
|
|
|
|
namespace Shader::IR {
|
|
|
|
std::string NameOf(Condition condition) {
|
|
std::string ret;
|
|
if (condition.GetFlowTest() != FlowTest::T) {
|
|
ret = fmt::to_string(condition.GetFlowTest());
|
|
}
|
|
const auto [pred, negated]{condition.GetPred()};
|
|
if (!ret.empty()) {
|
|
ret += '&';
|
|
}
|
|
if (negated) {
|
|
ret += '!';
|
|
}
|
|
ret += fmt::to_string(pred);
|
|
return ret;
|
|
}
|
|
|
|
} // namespace Shader::IR
|