From 3dea3352e4cd414f01ae3d3b2215d6b0f1348d32 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 30 Aug 2016 09:30:24 +0200 Subject: Remove backwards-compatibility kludges --- build2/dist/init.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'build2/dist') 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 (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; } } -- cgit v1.1