OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "tools/gn/value.h" | 5 #include "tools/gn/value.h" |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "tools/gn/scope.h" | 9 #include "tools/gn/scope.h" |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 origin_(origin) { | 22 origin_(origin) { |
23 } | 23 } |
24 | 24 |
25 Value::Value(const ParseNode* origin, bool bool_val) | 25 Value::Value(const ParseNode* origin, bool bool_val) |
26 : type_(BOOLEAN), | 26 : type_(BOOLEAN), |
27 boolean_value_(bool_val), | 27 boolean_value_(bool_val), |
28 int_value_(0), | 28 int_value_(0), |
29 origin_(origin) { | 29 origin_(origin) { |
30 } | 30 } |
31 | 31 |
32 Value::Value(const ParseNode* origin, int64 int_val) | 32 Value::Value(const ParseNode* origin, int64_t int_val) |
33 : type_(INTEGER), | 33 : type_(INTEGER), |
34 boolean_value_(false), | 34 boolean_value_(false), |
35 int_value_(int_val), | 35 int_value_(int_val), |
36 origin_(origin) { | 36 origin_(origin) { |
37 } | 37 } |
38 | 38 |
39 Value::Value(const ParseNode* origin, std::string str_val) | 39 Value::Value(const ParseNode* origin, std::string str_val) |
40 : type_(STRING), | 40 : type_(STRING), |
41 string_value_(), | 41 string_value_(), |
42 boolean_value_(false), | 42 boolean_value_(false), |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // iteration code. | 212 // iteration code. |
213 return false; | 213 return false; |
214 default: | 214 default: |
215 return false; | 215 return false; |
216 } | 216 } |
217 } | 217 } |
218 | 218 |
219 bool Value::operator!=(const Value& other) const { | 219 bool Value::operator!=(const Value& other) const { |
220 return !operator==(other); | 220 return !operator==(other); |
221 } | 221 } |
OLD | NEW |