Add parens to DateYMDFromTimeSlow to clearify.
BUG=649 Review URL: http://codereview.chromium.org/1132002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
2726a4d4f9
commit
103db91e12
@ -5731,11 +5731,11 @@ static inline void DateYMDFromTimeSlow(int date,
|
||||
bool is_leap = (!yd1 || yd2) && !yd3;
|
||||
|
||||
ASSERT(date >= -1);
|
||||
ASSERT(is_leap || date >= 0);
|
||||
ASSERT(date < 365 || is_leap && date < 366);
|
||||
ASSERT(is_leap == (year % 4 == 0 && (year % 100 || (year % 400 == 0))));
|
||||
ASSERT(is_leap || MakeDay(year, 0, 1) + date == save_date);
|
||||
ASSERT(!is_leap || MakeDay(year, 0, 1) + date + 1 == save_date);
|
||||
ASSERT(is_leap || (date >= 0));
|
||||
ASSERT((date < 365) || (is_leap && (date < 366)));
|
||||
ASSERT(is_leap == ((year % 4 == 0) && (year % 100 || (year % 400 == 0))));
|
||||
ASSERT(is_leap || ((MakeDay(year, 0, 1) + date) == save_date));
|
||||
ASSERT(!is_leap || ((MakeDay(year, 0, 1) + date + 1) == save_date));
|
||||
|
||||
if (is_leap) {
|
||||
day = kDayInYear[2*365 + 1 + date];
|
||||
|
Loading…
Reference in New Issue
Block a user