diff options
| author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2015-09-01 23:57:17 +0000 |
|---|---|---|
| committer | Bruce Mitchener <bruce.mitchener@gmail.com> | 2015-09-01 23:57:17 +0000 |
| commit | e8433cc17941d760f8ec96c6f280e152e4f00ef0 (patch) | |
| tree | 7a788e52e18bfb377bacbe2cf4660c98cf6486e4 /lldb/source/Host/common/FileSpec.cpp | |
| parent | 11deaae8a132906a0acdfa0d5801c5dd1b557b81 (diff) | |
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
Diffstat (limited to 'lldb/source/Host/common/FileSpec.cpp')
| -rw-r--r-- | lldb/source/Host/common/FileSpec.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp index a917a89d507e..9efdacb010bf 100644 --- a/lldb/source/Host/common/FileSpec.cpp +++ b/lldb/source/Host/common/FileSpec.cpp @@ -107,7 +107,7 @@ FileSpec::ResolveUsername (llvm::SmallVectorImpl<char> &path) return; llvm::StringRef path_str(path.data(), path.size()); - size_t slash_pos = path_str.find_first_of("/", 1); + size_t slash_pos = path_str.find('/', 1); if (slash_pos == 1 || path.size() == 1) { // A path of ~/ resolves to the current user's home dir |
