From 455ad2bf70eb0a6e29c8c7179e1c40c18bd8ee2f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 1 Jul 2015 17:37:23 +0200 Subject: Get rid of accessors/modifiers in cli.cxx target --- build/cli/rule.cxx | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) (limited to 'build/cli/rule.cxx') diff --git a/build/cli/rule.cxx b/build/cli/rule.cxx index 3bcd074..c0c8fe0 100644 --- a/build/cli/rule.cxx +++ b/build/cli/rule.cxx @@ -58,15 +58,13 @@ namespace build // cli.options are possible and we can determine whether the // --suppress-inline option is present. // - if (t.h () == nullptr) + if (t.h == nullptr) { - cxx::hxx& h (search (t.dir, t.name, nullptr, nullptr)); - h.group = &t; - t.h (h); + t.h = &search (t.dir, t.name, nullptr, nullptr); + t.h->group = &t; - cxx::cxx& c (search (t.dir, t.name, nullptr, nullptr)); - c.group = &t; - t.c (c); + t.c = & search (t.dir, t.name, nullptr, nullptr); + t.c->group = &t; bool inl (true); if (auto val = t["cli.options"]) @@ -83,9 +81,8 @@ namespace build if (inl) { - cxx::ixx& i (search (t.dir, t.name, nullptr, nullptr)); - i.group = &t; - t.i (i); + t.i = &search (t.dir, t.name, nullptr, nullptr); + t.i->group = &t; } } @@ -132,7 +129,7 @@ namespace build // For ixx{}, verify it is part of the group. // - if (t.is_a () && g->i () == nullptr) + if (t.is_a () && g->i == nullptr) { level3 ([&]{trace << "generation of inline file " << t << " is disabled with --suppress-inline";}); @@ -154,10 +151,10 @@ namespace build // Derive file names for the members. // - t.h ()->derive_path (); - t.c ()->derive_path (); - if (t.i () != nullptr) - t.i ()->derive_path (); + t.h->derive_path (); + t.c->derive_path (); + if (t.i != nullptr) + t.i->derive_path (); // Inject dependency on the output directory. // @@ -228,10 +225,10 @@ namespace build // See if we need to pass any --?xx-suffix options. // - append_extension (args, *t.h (), "--hxx-suffix", "hxx"); - append_extension (args, *t.c (), "--cxx-suffix", "cxx"); - if (t.i () != nullptr) - append_extension (args, *t.i (), "--ixx-suffix", "ixx"); + append_extension (args, *t.h, "--hxx-suffix", "hxx"); + append_extension (args, *t.c, "--cxx-suffix", "cxx"); + if (t.i != nullptr) + append_extension (args, *t.i, "--ixx-suffix", "ixx"); append_options (args, t, "cli.options"); @@ -283,10 +280,10 @@ namespace build // bool r (false); - if (t.i () != nullptr) - r = rmfile (t.i ()->path (), *t.i ()) || r; - r = rmfile (t.c ()->path (), *t.c ()) || r; - r = rmfile (t.h ()->path (), *t.h ()) || r; + if (t.i != nullptr) + r = rmfile (t.i->path (), *t.i) || r; + r = rmfile (t.c->path (), *t.c) || r; + r = rmfile (t.h->path (), *t.h) || r; t.mtime (timestamp_nonexistent); -- cgit v1.1