Update of /cvsroot/audacity/audacity-src/src/widgets
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv7903

Modified Files:
        Ruler.cpp 
Log Message:

A workaround for that 59 seconds displaying as 60 when using g++ (Ubuntu 
4.3.3-5ubuntu4) 4.3.3 under Ubuntu 9.04.


Index: Ruler.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/Ruler.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- Ruler.cpp   13 Mar 2009 00:43:57 -0000      1.61
+++ Ruler.cpp   20 Jun 2009 17:12:27 -0000      1.62
@@ -650,7 +650,9 @@
             s += t;
          }
          else {
-            int secs = (int)(d);
+            // The casting to float is working around an issue where 59 seconds
+            // would show up as 60 when using g++ (Ubuntu 4.3.3-5ubuntu4) 
4.3.3.
+            int secs = (int)(float)(d);
             wxString t1, t2, format;
 
             if (secs >= 3600)
@@ -662,7 +664,9 @@
                format.Printf(wxT("%%0%d.%dlf"), mDigits+3, mDigits);
             else
                format.Printf(wxT("%%%d.%dlf"), mDigits+3, mDigits);
-            t2.Printf(format.c_str(), fmod(d, 60.0));
+            // The casting to float is working around an issue where 59 seconds
+            // would show up as 60 when using g++ (Ubuntu 4.3.3-5ubuntu4) 
4.3.3.
+            t2.Printf(format.c_str(), fmod((float)d, 60.0));
 
             s += t1 + t2;
          }


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to