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

Unified Diff: src/runtime/runtime-scopes.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 | « src/date.cc ('k') | src/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-scopes.cc
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
index 2a0b435872b67d5ef7a553b480cb9007fba1cc4e..352e9efdf0b2c85beed23f4221fee4056df22027 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -106,7 +106,8 @@ RUNTIME_FUNCTION(Runtime_DeclareGlobals) {
bool is_var = initial_value->IsUndefined();
bool is_const = initial_value->IsTheHole();
bool is_function = initial_value->IsSharedFunctionInfo();
- DCHECK(is_var + is_const + is_function == 1);
+ DCHECK_EQ(1,
+ BoolToInt(is_var) + BoolToInt(is_const) + BoolToInt(is_function));
Handle<Object> value;
if (is_function) {
@@ -220,7 +221,8 @@ RUNTIME_FUNCTION(Runtime_DeclareLookupSlot) {
bool is_var = *initial_value == NULL;
bool is_const = initial_value->IsTheHole();
bool is_function = initial_value->IsJSFunction();
- DCHECK(is_var + is_const + is_function == 1);
+ DCHECK_EQ(1,
+ BoolToInt(is_var) + BoolToInt(is_const) + BoolToInt(is_function));
int index;
PropertyAttributes attributes;
« no previous file with comments | « src/date.cc ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698