Commit 03524ba3 authored by kmccullo's avatar kmccullo

Reviewed by DethBakin.

        - Apparently the build bot uses an older version of XCode which warns about conversions and the newest version does not.  I hope this fixes the build but I cann't be sure on my system.

        * kjs/DateMath.cpp:
        (KJS::msToYear):
        (KJS::dayInYear):
        (KJS::dateToDayInYear):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 85509c15
2006-10-04 Kevin McCullough <KMcCullough@apple.com>
Reviewed by DethBakin.
- Apparently the build bot uses an older version of XCode which warns about conversions and the newest version does not. I hope this fixes the build but I cann't be sure on my system.
* kjs/DateMath.cpp:
(KJS::msToYear):
(KJS::dayInYear):
(KJS::dateToDayInYear):
2006-10-05 Darin Adler <darin@apple.com>
Reviewed by Adam.
......
......@@ -113,9 +113,9 @@ static inline double msToDays(double ms)
return floor(ms / msPerDay);
}
static inline double msToYear(double ms)
static inline int msToYear(double ms)
{
double y = floor(ms /(msPerDay*365.2425)) + 1970;
int y = static_cast<int>(floor(ms /(msPerDay*365.2425)) + 1970);
double t2 = msFrom1970ToYear(y);
if (t2 > ms) {
......@@ -143,9 +143,9 @@ static inline bool isInLeapYear(double ms)
return isLeapYear(msToYear(ms));
}
static inline double dayInYear(double ms, int year)
static inline int dayInYear(double ms, int year)
{
return msToDays(ms) - daysFrom1970ToYear(year);
return static_cast<int>(msToDays(ms) - daysFrom1970ToYear(year));
}
static inline double msToMilliseconds(double ms)
......@@ -277,9 +277,9 @@ static inline double timeToMseconds(double hour, double min, double sec, double
static int dateToDayInYear(int year, int month, int day)
{
year += floor(month / 12);
year += static_cast<int>(floor(month / 12));
month = fmod(month, 12.0);
month = static_cast<int>(fmod(month, 12.0));
if (month < 0)
month += 12;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment