From 1a55c0d6ec9b1cd9f78de82ed068224cac4e6cb2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 9 Feb 2021 13:07:05 +0200 Subject: Minor simplification --- libbuild2/cc/common.cxx | 4 ++-- libbuild2/cc/pkgconfig.cxx | 6 +++--- libbuild2/install/utility.hxx | 4 ++-- libbuild2/variable.cxx | 4 ++-- libbuild2/variable.hxx | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'libbuild2') diff --git a/libbuild2/cc/common.cxx b/libbuild2/cc/common.cxx index 7492181..d11b216 100644 --- a/libbuild2/cc/common.cxx +++ b/libbuild2/cc/common.cxx @@ -899,7 +899,7 @@ namespace build2 if (p.second) { - p.first.get () = string ("cc"); + p.first = string ("cc"); if (sys) t.vars.assign (c_system) = true; @@ -951,7 +951,7 @@ namespace build2 strings o; o.push_back (move (d)); - p.first.get () = move (o); + p.first = move (o); } } }; diff --git a/libbuild2/cc/pkgconfig.cxx b/libbuild2/cc/pkgconfig.cxx index 25df3df..48219f2 100644 --- a/libbuild2/cc/pkgconfig.cxx +++ b/libbuild2/cc/pkgconfig.cxx @@ -739,7 +739,7 @@ namespace build2 // export stub and we shouldn't touch them. // if (p.second) - p.first.get () = move (pops); + p.first = move (pops); } }; @@ -1090,7 +1090,7 @@ namespace build2 auto p (t.vars.insert (c_export_loptions)); if (p.second) - p.first.get () = move (lops); + p.first = move (lops); } // Set even if empty (export override). @@ -1099,7 +1099,7 @@ namespace build2 auto p (t.vars.insert (la ? c_export_imp_libs : c_export_libs)); if (p.second) - p.first.get () = move (libs); + p.first = move (libs); } }; diff --git a/libbuild2/install/utility.hxx b/libbuild2/install/utility.hxx index ee78e17..2c0ca56 100644 --- a/libbuild2/install/utility.hxx +++ b/libbuild2/install/utility.hxx @@ -28,7 +28,7 @@ namespace build2 *s.var_pool ().find ("install"))); if (r.second) // Already set by the user? - r.first.get () = path_cast (move (d)); + r.first = path_cast (move (d)); } template @@ -46,7 +46,7 @@ namespace build2 *s.var_pool ().find ("install.mode"))); if (r.second) // Already set by the user? - r.first.get () = move (m); + r.first = move (m); } template diff --git a/libbuild2/variable.cxx b/libbuild2/variable.cxx index 8cd6404..917b9e7 100644 --- a/libbuild2/variable.cxx +++ b/libbuild2/variable.cxx @@ -1736,7 +1736,7 @@ namespace build2 return pair (r, p.second); } - pair, bool> variable_map:: + pair variable_map:: insert (const variable& var, bool typed) { assert (!global_ || ctx->phase == run_phase::load); @@ -1756,7 +1756,7 @@ namespace build2 r.version++; - return make_pair (reference_wrapper (r), p.second); + return pair (r, p.second); } // variable_type_map diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx index 2d85af3..898648c 100644 --- a/libbuild2/variable.hxx +++ b/libbuild2/variable.hxx @@ -1596,7 +1596,7 @@ namespace build2 // will be NULL) was actually inserted. Similar to find(), if typed is // false, leave the value untyped even if the variable is. // - pair, bool> + pair insert (const variable&, bool typed = true); pair -- cgit v1.1