Changeset 16786 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Oct 4, 2006, 2:08:43 PM (19 years ago)
Author:
kmccullo
Message:

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):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r16783 r16786  
     12006-10-04  Kevin McCullough  <[email protected]>
     2
     3        Reviewed by DethBakin.
     4
     5        - 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.
     6
     7        * kjs/DateMath.cpp:
     8        (KJS::msToYear):
     9        (KJS::dayInYear):
     10        (KJS::dateToDayInYear):
     11
    1122006-10-05  Darin Adler  <[email protected]>
    213
  • trunk/JavaScriptCore/kjs/DateMath.cpp

    r16783 r16786  
    114114}
    115115
    116 static inline double msToYear(double ms)
    117 {
    118     double y = floor(ms /(msPerDay*365.2425)) + 1970;
     116static inline int msToYear(double ms)
     117{
     118    int y = static_cast<int>(floor(ms /(msPerDay*365.2425)) + 1970);
    119119    double t2 = msFrom1970ToYear(y);
    120120
     
    144144}
    145145
    146 static inline double dayInYear(double ms, int year)
    147 {
    148     return msToDays(ms) - daysFrom1970ToYear(year);
     146static inline int dayInYear(double ms, int year)
     147{
     148    return static_cast<int>(msToDays(ms) - daysFrom1970ToYear(year));
    149149}
    150150
     
    278278static int dateToDayInYear(int year, int month, int day)
    279279{
    280     year += floor(month / 12);
    281 
    282     month = fmod(month, 12.0);
     280    year += static_cast<int>(floor(month / 12));
     281
     282    month = static_cast<int>(fmod(month, 12.0));
    283283    if (month < 0)
    284284        month += 12;
Note: See TracChangeset for help on using the changeset viewer.