Code Cleanup
- Used the shorter form of std::string::substr that defaults the second argument to std::string::npos.
This commit is contained in:
@@ -736,8 +736,7 @@ static std::string importTodoSh_2_0 (const std::vector <std::string>& lines)
|
||||
if (words[w].length () > 1 &&
|
||||
words[w][0] == '+')
|
||||
{
|
||||
context.args.push_back (std::string ("project:") +
|
||||
words[w].substr (1, std::string::npos));
|
||||
context.args.push_back (std::string ("project:") + words[w].substr (1));
|
||||
}
|
||||
|
||||
// Convert "+aaa" to "project:aaa".
|
||||
@@ -745,8 +744,7 @@ static std::string importTodoSh_2_0 (const std::vector <std::string>& lines)
|
||||
else if (words[w].length () > 1 &&
|
||||
words[w][0] == '@')
|
||||
{
|
||||
context.args.push_back (std::string ("+") +
|
||||
words[w].substr (1, std::string::npos));
|
||||
context.args.push_back (std::string ("+") + words[w].substr (1));
|
||||
}
|
||||
|
||||
// Convert "(A)" to "priority:H".
|
||||
|
||||
Reference in New Issue
Block a user