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
This commit is contained in:
Bruce Mitchener
2015-09-01 23:57:17 +00:00
parent 11deaae8a1
commit e8433cc179
11 changed files with 19 additions and 19 deletions

View File

@@ -609,12 +609,12 @@ RSModuleDescriptor::ParseRSInfo()
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())