diff base/RealTime.cpp @ 935:f960d67ce842 tonioni

Merge from branch warnfix_no_size_t
author Chris Cannam
date Wed, 18 Jun 2014 13:42:01 +0100
parents 6a94bb528e9d
children df83865d886f
line wrap: on
line diff
--- a/base/RealTime.cpp	Mon Jun 16 11:28:45 2014 +0100
+++ b/base/RealTime.cpp	Wed Jun 18 13:42:01 2014 +0100
@@ -89,8 +89,6 @@
 
     bool negative = false, afterT = false;
 
-    int valstart = 0;
-
     while (i < len) {
 
         if (s[i] == '-') {
@@ -103,7 +101,6 @@
         char *eptr = 0;
 
         if (isdigit(s[i]) || s[i] == '.') {
-            valstart = i;
             value = strtod(&s[i], &eptr);
             i = eptr - s;
         }
@@ -151,7 +148,11 @@
 
     t = t + fromSeconds(second);
 
-    return t;
+    if (negative) {
+        return -t;
+    } else {
+        return t;
+    }
 }
 
 double