From 5af9070fda0dba591264ed675920efcfd62e81bc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 8 Apr 2015 16:09:31 +0200 Subject: Distinguish between undefined and null variables --- build/config/operation.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build/config') diff --git a/build/config/operation.cxx b/build/config/operation.cxx index b85a5c7..ef83e47 100644 --- a/build/config/operation.cxx +++ b/build/config/operation.cxx @@ -99,13 +99,13 @@ namespace build // if (auto gval = (*global_scope)[var]) { - if (!pval || !pval->compare (gval.as ())) + if (pval == nullptr || !pval->compare (gval.as ())) warn << "variable " << var.name << " configured value " << "differs from command line value" << info << "reconfigure the project to use command line value"; } - if (pval) + if (pval != nullptr) { //@@ TODO: assuming list // @@ -116,8 +116,8 @@ namespace build } else { - ofs << var.name << " =" << endl; // @@ TODO: [undefined] - //text << var.name << " = [undefined]"; + ofs << var.name << " = #[null]" << endl; // @@ TODO: [null] + //text << var.name << " = [null]"; } } } -- cgit v1.1