mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 22:47: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
|
@ -705,12 +705,12 @@ bool Date::isRelativeDate (const std::string& input)
|
|||
if (isdigit (input[1]))
|
||||
{
|
||||
number = atoi (input.substr (0, 2).c_str ());
|
||||
ordinal = lowerCase (input.substr (2, std::string::npos));
|
||||
ordinal = lowerCase (input.substr (2));
|
||||
}
|
||||
else
|
||||
{
|
||||
number = atoi (input.substr (0, 2).c_str ());
|
||||
ordinal = lowerCase (input.substr (1, std::string::npos));
|
||||
ordinal = lowerCase (input.substr (1));
|
||||
}
|
||||
|
||||
// Sanity check.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue