From 18c7af7e809bbbc68b71f109e352dc0297e9e05a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 17 Dec 2006 15:49:46 +0000 Subject: [PATCH] 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 --- include/wx/datetime.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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