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

Unified Diff: tools/gn/operators.cc

Issue 2554083003: gn: Fix integer subtraction. (Closed)
Patch Set: Created 4 years 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 | tools/gn/operators_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/operators.cc
diff --git a/tools/gn/operators.cc b/tools/gn/operators.cc
index 72b2dd18ce63ade447721cbc8a199c5b24699b9b..350fef4286b014f8f949c55934e3f39f16056055 100644
--- a/tools/gn/operators.cc
+++ b/tools/gn/operators.cc
@@ -419,7 +419,7 @@ Value ExecuteMinus(const BinaryOpNode* op_node,
const Value& right,
Err* err) {
// Left-hand-side int. The only thing to do is subtract another int.
- if (left.type() == Value::INTEGER && right.type() != Value::INTEGER) {
+ if (left.type() == Value::INTEGER && right.type() == Value::INTEGER) {
// Int - int -> subtraction.
return Value(op_node, left.int_value() - right.int_value());
}
« no previous file with comments | « no previous file | tools/gn/operators_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698