From 65d270e5d8ef81d9cfe9f3adc60a73be1e1d9746 Mon Sep 17 00:00:00 2001 From: scribam Date: Sat, 14 Jul 2018 21:37:58 +0200 Subject: [PATCH] clang-tidy: performance-faster-string-find https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html --- rpcs3/Emu/RSX/Common/ShaderParam.h | 2 +- rpcs3/Emu/RSX/Common/VertexProgramDecompiler.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/Common/ShaderParam.h b/rpcs3/Emu/RSX/Common/ShaderParam.h index 837b677117..d6cbc5f051 100644 --- a/rpcs3/Emu/RSX/Common/ShaderParam.h +++ b/rpcs3/Emu/RSX/Common/ShaderParam.h @@ -179,7 +179,7 @@ public: { // Separate 'double destination' variables 'X=Y=SRC' std::string simple_var; - const auto pos = var.find("="); + const auto pos = var.find('='); if (pos != std::string::npos) { diff --git a/rpcs3/Emu/RSX/Common/VertexProgramDecompiler.cpp b/rpcs3/Emu/RSX/Common/VertexProgramDecompiler.cpp index 5f533ee740..0ee8fbac40 100644 --- a/rpcs3/Emu/RSX/Common/VertexProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/Common/VertexProgramDecompiler.cpp @@ -309,7 +309,7 @@ void VertexProgramDecompiler::AddCodeCond(const std::string& dst, const std::str auto get_masked_dst = [](const std::string& dest, const char mask) { const auto selector = std::string(".") + mask; - const auto pos = dest.find("="); + const auto pos = dest.find('='); std::string result = dest + selector;