Changeset 16786 in webkit for trunk/JavaScriptCore
- Timestamp:
- Oct 4, 2006, 2:08:43 PM (19 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r16783 r16786 1 2006-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 1 12 2006-10-05 Darin Adler <[email protected]> 2 13 -
trunk/JavaScriptCore/kjs/DateMath.cpp
r16783 r16786 114 114 } 115 115 116 static inline doublemsToYear(double ms)117 { 118 double y = floor(ms /(msPerDay*365.2425)) + 1970;116 static inline int msToYear(double ms) 117 { 118 int y = static_cast<int>(floor(ms /(msPerDay*365.2425)) + 1970); 119 119 double t2 = msFrom1970ToYear(y); 120 120 … … 144 144 } 145 145 146 static inline doubledayInYear(double ms, int year)147 { 148 return msToDays(ms) - daysFrom1970ToYear(year);146 static inline int dayInYear(double ms, int year) 147 { 148 return static_cast<int>(msToDays(ms) - daysFrom1970ToYear(year)); 149 149 } 150 150 … … 278 278 static int dateToDayInYear(int year, int month, int day) 279 279 { 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)); 283 283 if (month < 0) 284 284 month += 12;
Note:
See TracChangeset
for help on using the changeset viewer.