summaryrefslogtreecommitdiffstats
path: root/tools/gn/value.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-18 20:24:40 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-18 20:24:40 +0000
commit55a3dd76bec38b288d8577238c04c716a5779de3 (patch)
tree50990b8603336de998621c84b5fdfef056a9d9a9 /tools/gn/value.cc
parenta509963441f7a4e1d3c043edbf637f75e9f8995b (diff)
downloadchromium_src-55a3dd76bec38b288d8577238c04c716a5779de3.zip
chromium_src-55a3dd76bec38b288d8577238c04c716a5779de3.tar.gz
chromium_src-55a3dd76bec38b288d8577238c04c716a5779de3.tar.bz2
Remove default value checking in GN, adds getenv function, reorders parameters to rebase_path.
This allows us to have the default value vary according to other parameters. This is what we need in many cases, so having this restriction just made things more complicated. The getenv function will allow us to replace some Python scripts with a fast native function call. The use of rebase path is pretty annoying. 99% of all callers want the "from" directory to be the current one. I reordered the parameters to move the from directory later so we can have a default value for it. This will require a patch to change all current callers of rebase_path when new deps are pulled. BUG=342937 R=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/161783002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251821 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/value.cc')
-rw-r--r--tools/gn/value.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gn/value.cc b/tools/gn/value.cc
index b36c962..659ebb9 100644
--- a/tools/gn/value.cc
+++ b/tools/gn/value.cc
@@ -8,12 +8,14 @@
Value::Value()
: type_(NONE),
+ boolean_value_(false),
int_value_(0),
origin_(NULL) {
}
Value::Value(const ParseNode* origin, Type t)
: type_(t),
+ boolean_value_(false),
int_value_(0),
origin_(origin) {
}
@@ -35,6 +37,7 @@ Value::Value(const ParseNode* origin, int64 int_val)
Value::Value(const ParseNode* origin, std::string str_val)
: type_(STRING),
string_value_(),
+ boolean_value_(false),
int_value_(0),
origin_(origin) {
string_value_.swap(str_val);
@@ -43,6 +46,7 @@ Value::Value(const ParseNode* origin, std::string str_val)
Value::Value(const ParseNode* origin, const char* str_val)
: type_(STRING),
string_value_(str_val),
+ boolean_value_(false),
int_value_(0),
origin_(origin) {
}