]> git.saurik.com Git - wxWidgets.git/commitdiff
suppress a CodeWarrior warning about long to int conversion (bug 1616948)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 17 Dec 2006 15:49:46 +0000 (15:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 17 Dec 2006 15:49:46 +0000 (15:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/datetime.h

index 7c75150dbaab595dde77ed6c410ba6dc7219d91e..c65e1f64d80f0cff877581bb1c68a6c5498c8b8d 100644 (file)
@@ -1928,7 +1928,9 @@ inline wxLongLong wxTimeSpan::GetSeconds() const
 
 inline int wxTimeSpan::GetMinutes() const
 {
-    return (GetSeconds() / 60l).GetLo();
+    // explicit cast to int suppresses a warning with CodeWarrior and possibly
+    // others (changing the return type to long from int is impossible in 2.8)
+    return (int)((GetSeconds() / 60l).GetLo());
 }
 
 inline int wxTimeSpan::GetHours() const