From: Vadim Zeitlin Date: Sun, 17 Dec 2006 15:49:46 +0000 (+0000) Subject: suppress a CodeWarrior warning about long to int conversion (bug 1616948) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/18c7af7e809bbbc68b71f109e352dc0297e9e05a suppress a CodeWarrior warning about long to int conversion (bug 1616948) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 7c75150dba..c65e1f64d8 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -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