diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-30 09:30:24 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-30 10:00:35 +0200 |
commit | 3dea3352e4cd414f01ae3d3b2215d6b0f1348d32 (patch) | |
tree | 899581ab605700450c5ca40e32e1ff37b3e9212d /build2/dist | |
parent | f89d2c16c1dad9b8d2f3b0e402a47e30521f5a69 (diff) |
Remove backwards-compatibility kludges
Diffstat (limited to 'build2/dist')
-rw-r--r-- | build2/dist/init.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/build2/dist/init.cxx b/build2/dist/init.cxx index 637a232..338f6c8 100644 --- a/build2/dist/init.cxx +++ b/build2/dist/init.cxx @@ -104,9 +104,7 @@ namespace build2 if (s) { - const value& cv (config::optional (r, "config.dist.root")); - - if (cv && !cv.empty ()) // @@ BC LT [null] + if (const value& cv = config::optional (r, "config.dist.root")) v = cast<dir_path> (cv); // Strip abs_dir_path. } } @@ -118,10 +116,9 @@ namespace build2 if (s) { - const value& cv ( - config::required (r, "config.dist.cmd", path ("install")).first); - - if (cv && !cv.empty ()) // @@ BC LT [null] + if (const value& cv = config::required (r, + "config.dist.cmd", + path ("install")).first) v = cv; } } @@ -133,9 +130,7 @@ namespace build2 if (s) { - const value& cv (config::optional (r, "config.dist.archives")); - - if (cv && !cv.empty ()) // @@ BC LT [null] + if (const value& cv = config::optional (r, "config.dist.archives")) v = cv; } } |