Code Cleanup

- Used the shorter form of std::string::substr that defaults the second
  argument to std::string::npos.
This commit is contained in:
Paul Beckingham 2009-12-13 16:59:28 -05:00
parent 75e738a9c9
commit 2cf25b7c35
14 changed files with 41 additions and 43 deletions

View file

@ -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.