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/Core/FormatEntity.cpp | |
parent | 11deaae8a132906a0acdfa0d5801c5dd1b557b81 (diff) | |
download | bcm5719-llvm-e8433cc17941d760f8ec96c6f280e152e4f00ef0.tar.gz bcm5719-llvm-e8433cc17941d760f8ec96c6f280e152e4f00ef0.zip |
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/Core/FormatEntity.cpp')
-rw-r--r-- | lldb/source/Core/FormatEntity.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp index a53b46a5301..4e0258889f1 100644 --- a/lldb/source/Core/FormatEntity.cpp +++ b/lldb/source/Core/FormatEntity.cpp @@ -2424,10 +2424,10 @@ FormatEntity::ExtractVariableInfo (llvm::StringRef &format_str, llvm::StringRef variable_name = llvm::StringRef(); variable_format = llvm::StringRef(); - const size_t paren_pos = format_str.find_first_of('}'); + const size_t paren_pos = format_str.find('}'); if (paren_pos != llvm::StringRef::npos) { - const size_t percent_pos = format_str.find_first_of('%'); + const size_t percent_pos = format_str.find('%'); if (percent_pos < paren_pos) { if (percent_pos > 0) |