transform negative numbers to positives by *(-1)

This commit is contained in:
Dennis Luxen 2014-07-11 14:00:33 +02:00
parent 0061b3fcbf
commit 637bab29c6

View File

@ -122,7 +122,7 @@ static inline unsigned StringToUint(const std::string &input)
{
auto first_digit = input.begin();
// Delete any trailing white-spaces
while (first_digit != input.end() && std::isspace(*first_digit))
while (first_digit != input.end() && (std::isspace(*first_digit) || '-' == *first_digit))
{
++first_digit;
}