commit | e8433cc17941d760f8ec96c6f280e152e4f00ef0 | [log] [tgz] |
---|---|---|
author | Bruce Mitchener <bruce.mitchener@gmail.com> | Tue Sep 01 23:57:17 2015 +0000 |
committer | Bruce Mitchener <bruce.mitchener@gmail.com> | Tue Sep 01 23:57:17 2015 +0000 |
tree | 7a788e52e18bfb377bacbe2cf4660c98cf6486e4 | |
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
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp index 40879e1..9308c7a 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
@@ -230,7 +230,7 @@ if (for_expression && !name.empty()) { - size_t less_than_pos = name.find_first_of('<'); + size_t less_than_pos = name.find('<'); if (less_than_pos != std::string::npos) {
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index cc47778..b3670b5 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
@@ -609,12 +609,12 @@ std::string info((const char *)buffer->GetBytes()); std::vector<std::string> info_lines; - size_t lpos = info.find_first_of("\n"); + size_t lpos = info.find('\n'); while (lpos != std::string::npos) { info_lines.push_back(info.substr(0, lpos)); info = info.substr(lpos + 1); - lpos = info.find_first_of("\n"); + lpos = info.find('\n'); } size_t offset = 0; while (offset < info_lines.size())