mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 13:37:20 +02:00
Code Cleanup
- Used the shorter form of std::string::substr that defaults the second argument to std::string::npos.
This commit is contained in:
parent
75e738a9c9
commit
2cf25b7c35
14 changed files with 41 additions and 43 deletions
|
@ -220,7 +220,7 @@ void Task::legacyParse (const std::string& line)
|
|||
set (pair[0], pair[1]);
|
||||
}
|
||||
|
||||
set ("description", line.substr (closeAttrBracket + 2, std::string::npos)); // No i18n
|
||||
set ("description", line.substr (closeAttrBracket + 2)); // No i18n
|
||||
}
|
||||
else
|
||||
throw std::string ("Missing attribute brackets"); // TODO i18n
|
||||
|
@ -321,7 +321,7 @@ void Task::legacyParse (const std::string& line)
|
|||
}
|
||||
}
|
||||
|
||||
set ("description", line.substr (closeAnnoBracket + 2, std::string::npos)); // No i18n
|
||||
set ("description", line.substr (closeAnnoBracket + 2)); // No i18n
|
||||
}
|
||||
else
|
||||
throw std::string ("Missing annotation brackets."); // TODO i18n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue