Simplify find_first_of & find_last_of on single char.
Summary:
When calling find_first_of and find_last_of on a single character,
we can instead just call find / rfind and make our intent more
clear.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12518
llvm-svn: 246609
diff --git a/lldb/tools/lldb-mi/MICmdArgValString.cpp b/lldb/tools/lldb-mi/MICmdArgValString.cpp
index aefcffe..bea5935 100644
--- a/lldb/tools/lldb-mi/MICmdArgValString.cpp
+++ b/lldb/tools/lldb-mi/MICmdArgValString.cpp
@@ -220,8 +220,8 @@
if (!m_bHandleDirPaths)
{
// Look for directory file paths, if found reject
- const bool bHavePosSlash = (vrTxt.find_first_of("/") != std::string::npos);
- const bool bHaveBckSlash = (vrTxt.find_first_of("\\") != std::string::npos);
+ const bool bHavePosSlash = (vrTxt.find('/') != std::string::npos);
+ const bool bHaveBckSlash = (vrTxt.find('\\') != std::string::npos);
if (bHavePosSlash || bHaveBckSlash)
return false;
}