mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
rsx: Apply Clang-Tidy fix "readability-redundant-string-init"
This commit is contained in:
parent
331fe01762
commit
8f2647555a
7 changed files with 13 additions and 13 deletions
|
@ -9,7 +9,7 @@
|
||||||
void CgBinaryDisasm::AddCodeAsm(const std::string& code)
|
void CgBinaryDisasm::AddCodeAsm(const std::string& code)
|
||||||
{
|
{
|
||||||
verify(HERE), (m_opcode < 70);
|
verify(HERE), (m_opcode < 70);
|
||||||
std::string op_name = "";
|
std::string op_name;
|
||||||
|
|
||||||
if (dst.dest_reg == 63)
|
if (dst.dest_reg == 63)
|
||||||
{
|
{
|
||||||
|
@ -202,7 +202,7 @@ template<typename T> std::string CgBinaryDisasm::GetSrcDisAsm(T src)
|
||||||
|
|
||||||
static const char f[4] = { 'x', 'y', 'z', 'w' };
|
static const char f[4] = { 'x', 'y', 'z', 'w' };
|
||||||
|
|
||||||
std::string swizzle = "";
|
std::string swizzle;
|
||||||
swizzle += f[src.swizzle_x];
|
swizzle += f[src.swizzle_x];
|
||||||
swizzle += f[src.swizzle_y];
|
swizzle += f[src.swizzle_y];
|
||||||
swizzle += f[src.swizzle_z];
|
swizzle += f[src.swizzle_z];
|
||||||
|
|
|
@ -223,7 +223,7 @@ public:
|
||||||
std::string GetCgParamName(u32 offset) const
|
std::string GetCgParamName(u32 offset) const
|
||||||
{
|
{
|
||||||
std::stringstream str_stream;
|
std::stringstream str_stream;
|
||||||
std::string name = "";
|
std::string name;
|
||||||
while (m_buffer[offset] != 0)
|
while (m_buffer[offset] != 0)
|
||||||
{
|
{
|
||||||
str_stream << m_buffer[offset];
|
str_stream << m_buffer[offset];
|
||||||
|
@ -243,7 +243,7 @@ public:
|
||||||
std::string GetCgParamSemantic(u32 offset) const
|
std::string GetCgParamSemantic(u32 offset) const
|
||||||
{
|
{
|
||||||
std::stringstream str_stream;
|
std::stringstream str_stream;
|
||||||
std::string semantic = "";
|
std::string semantic;
|
||||||
while (m_buffer[offset] != 0)
|
while (m_buffer[offset] != 0)
|
||||||
{
|
{
|
||||||
str_stream << m_buffer[offset];
|
str_stream << m_buffer[offset];
|
||||||
|
|
|
@ -558,7 +558,7 @@ template<typename T> std::string FragmentProgramDecompiler::GetSRC(T src)
|
||||||
|
|
||||||
static const char f[4] = { 'x', 'y', 'z', 'w' };
|
static const char f[4] = { 'x', 'y', 'z', 'w' };
|
||||||
|
|
||||||
std::string swizzle = "";
|
std::string swizzle;
|
||||||
swizzle += f[src.swizzle_x];
|
swizzle += f[src.swizzle_x];
|
||||||
swizzle += f[src.swizzle_y];
|
swizzle += f[src.swizzle_y];
|
||||||
swizzle += f[src.swizzle_z];
|
swizzle += f[src.swizzle_z];
|
||||||
|
|
|
@ -229,7 +229,7 @@ void GLFragmentDecompilerThread::insertMainStart(std::stringstream & OS)
|
||||||
"h0", "h2", "h4", "h6", "h8"
|
"h0", "h2", "h4", "h6", "h8"
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string parameters = "";
|
std::string parameters;
|
||||||
const auto half4 = getHalfTypeName(4);
|
const auto half4 = getHalfTypeName(4);
|
||||||
for (auto ®_name : output_values)
|
for (auto ®_name : output_values)
|
||||||
{
|
{
|
||||||
|
@ -332,7 +332,7 @@ void GLFragmentDecompilerThread::insertMainEnd(std::stringstream & OS)
|
||||||
OS << "void main()\n";
|
OS << "void main()\n";
|
||||||
OS << "{\n";
|
OS << "{\n";
|
||||||
|
|
||||||
std::string parameters = "";
|
std::string parameters;
|
||||||
const auto half4 = getHalfTypeName(4);
|
const auto half4 = getHalfTypeName(4);
|
||||||
|
|
||||||
for (auto ®_name : output_values)
|
for (auto ®_name : output_values)
|
||||||
|
|
|
@ -170,7 +170,7 @@ void GLVertexDecompilerThread::insertMainStart(std::stringstream & OS)
|
||||||
insert_glsl_legacy_function(OS, properties2);
|
insert_glsl_legacy_function(OS, properties2);
|
||||||
glsl::insert_vertex_input_fetch(OS, glsl::glsl_rules_opengl4, dev_caps.vendor_INTEL == false);
|
glsl::insert_vertex_input_fetch(OS, glsl::glsl_rules_opengl4, dev_caps.vendor_INTEL == false);
|
||||||
|
|
||||||
std::string parameters = "";
|
std::string parameters;
|
||||||
for (int i = 0; i < 16; ++i)
|
for (int i = 0; i < 16; ++i)
|
||||||
{
|
{
|
||||||
std::string reg_name = "dst_reg" + std::to_string(i);
|
std::string reg_name = "dst_reg" + std::to_string(i);
|
||||||
|
@ -218,7 +218,7 @@ void GLVertexDecompilerThread::insertMainEnd(std::stringstream & OS)
|
||||||
OS << "void main ()\n";
|
OS << "void main ()\n";
|
||||||
OS << "{\n";
|
OS << "{\n";
|
||||||
|
|
||||||
std::string parameters = "";
|
std::string parameters;
|
||||||
|
|
||||||
if (ParamType *vec4Types = m_parr.SearchParam(PF_PARAM_OUT, "vec4"))
|
if (ParamType *vec4Types = m_parr.SearchParam(PF_PARAM_OUT, "vec4"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -259,7 +259,7 @@ void VKFragmentDecompilerThread::insertMainStart(std::stringstream & OS)
|
||||||
"h0", "h2", "h4", "h6", "h8"
|
"h0", "h2", "h4", "h6", "h8"
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string parameters = "";
|
std::string parameters;
|
||||||
const auto half4 = getHalfTypeName(4);
|
const auto half4 = getHalfTypeName(4);
|
||||||
for (auto ®_name : output_values)
|
for (auto ®_name : output_values)
|
||||||
{
|
{
|
||||||
|
@ -365,7 +365,7 @@ void VKFragmentDecompilerThread::insertMainEnd(std::stringstream & OS)
|
||||||
OS << "void main()\n";
|
OS << "void main()\n";
|
||||||
OS << "{\n";
|
OS << "{\n";
|
||||||
|
|
||||||
std::string parameters = "";
|
std::string parameters;
|
||||||
const auto half4 = getHalfTypeName(4);
|
const auto half4 = getHalfTypeName(4);
|
||||||
|
|
||||||
for (auto ®_name : output_values)
|
for (auto ®_name : output_values)
|
||||||
|
|
|
@ -206,7 +206,7 @@ void VKVertexDecompilerThread::insertMainStart(std::stringstream & OS)
|
||||||
glsl::insert_glsl_legacy_function(OS, properties2);
|
glsl::insert_glsl_legacy_function(OS, properties2);
|
||||||
glsl::insert_vertex_input_fetch(OS, glsl::glsl_rules_spirv);
|
glsl::insert_vertex_input_fetch(OS, glsl::glsl_rules_spirv);
|
||||||
|
|
||||||
std::string parameters = "";
|
std::string parameters;
|
||||||
for (int i = 0; i < 16; ++i)
|
for (int i = 0; i < 16; ++i)
|
||||||
{
|
{
|
||||||
std::string reg_name = "dst_reg" + std::to_string(i);
|
std::string reg_name = "dst_reg" + std::to_string(i);
|
||||||
|
@ -254,7 +254,7 @@ void VKVertexDecompilerThread::insertMainEnd(std::stringstream & OS)
|
||||||
OS << "void main ()\n";
|
OS << "void main ()\n";
|
||||||
OS << "{\n";
|
OS << "{\n";
|
||||||
|
|
||||||
std::string parameters = "";
|
std::string parameters;
|
||||||
|
|
||||||
if (ParamType *vec4Types = m_parr.SearchParam(PF_PARAM_OUT, "vec4"))
|
if (ParamType *vec4Types = m_parr.SearchParam(PF_PARAM_OUT, "vec4"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue