Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3216)

Unified Diff: src/date.cc

Issue 825913005: Avoid MSVC's C6323 warning (use of arithmetic operator on Boolean type) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/runtime/runtime-scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/date.cc
diff --git a/src/date.cc b/src/date.cc
index 6b95cb721291bc94f6eba556855c3e8936ff05e7..1f879de1350222b58691f40513339a090e3514a0 100644
--- a/src/date.cc
+++ b/src/date.cc
@@ -103,8 +103,8 @@ void DateCache::YearMonthDayFromDays(
days += is_leap;
// Check if the date is after February.
- if (days >= 31 + 28 + is_leap) {
- days -= 31 + 28 + is_leap;
+ if (days >= 31 + 28 + BoolToInt(is_leap)) {
+ days -= 31 + 28 + BoolToInt(is_leap);
// Find the date starting from March.
for (int i = 2; i < 12; i++) {
if (days < kDaysInMonths[i]) {
« no previous file with comments | « no previous file | src/runtime/runtime-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698