clang-tidy: performance-faster-string-find

https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html
This commit is contained in:
scribam 2018-07-14 21:37:58 +02:00 committed by Ivan
parent e18e6576f3
commit 65d270e5d8
2 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,7 @@ public:
{ {
// Separate 'double destination' variables 'X=Y=SRC' // Separate 'double destination' variables 'X=Y=SRC'
std::string simple_var; std::string simple_var;
const auto pos = var.find("="); const auto pos = var.find('=');
if (pos != std::string::npos) if (pos != std::string::npos)
{ {

View File

@ -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) auto get_masked_dst = [](const std::string& dest, const char mask)
{ {
const auto selector = std::string(".") + mask; const auto selector = std::string(".") + mask;
const auto pos = dest.find("="); const auto pos = dest.find('=');
std::string result = dest + selector; std::string result = dest + selector;