Code Cleanup
- Used the shorter form of std::string::substr that defaults the second argument to std::string::npos.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user