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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user