diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-19 16:50:40 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-19 16:50:40 +0200 |
commit | 5164c843513212ab1ac1f721c4de04b6a865eb0c (patch) | |
tree | 1c6b2f440bd6dcd41fed60e76095bae2bf4e9e54 /build2/prerequisite | |
parent | 5607313a91e5ca0113b1f8b9acfd02c1fb105346 (diff) |
Get rid of extension_pool
Diffstat (limited to 'build2/prerequisite')
-rw-r--r-- | build2/prerequisite | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/build2/prerequisite b/build2/prerequisite index b259557..5dfd1aa 100644 --- a/build2/prerequisite +++ b/build2/prerequisite @@ -31,11 +31,11 @@ namespace build2 target_key tk; // .dir and .out can be relative. mutable scope_type* scope; // Can be NULL if tk.dir is absolute. + static const optional<string> nullproj; + template <typename T> bool is_a () const {return tk.is_a<T> ();} bool is_a (const target_type& tt) const {return tk.is_a (tt);} - - static const optional<string> nullproj; }; inline bool @@ -90,14 +90,14 @@ namespace build2 // const optional<string> proj; const target_type_type& type; - const dir_path dir; // Normalized absolute or relative (to scope). - const dir_path out; // Empty, normalized absolute, or relative. + const dir_path dir; // Normalized absolute or relative (to scope). + const dir_path out; // Empty, normalized absolute, or relative. const string name; - const string* ext; // NULL if unspecified. + const optional<string> ext; // Absent if unspecified. scope_type& scope; - target_type* target; // NULL if not yet resolved. Note that this should - // always be the "primary target", not a member of - // a target group. + target_type* target; // NULL if not yet resolved. Note that this + // should always be the "primary target", not + // a member of a target group. public: prerequisite (optional<string> p, @@ -105,14 +105,14 @@ namespace build2 dir_path d, dir_path o, string n, - const string* e, + optional<string> e, scope_type& s) : proj (move (p)), type (t), dir (move (d)), out (move (o)), name (move (n)), - ext (e), + ext (move (e)), scope (s), target (nullptr) {} @@ -188,7 +188,7 @@ namespace build2 dir_path dir, dir_path out, string name, - const string* ext, + optional<string> ext, scope&, tracer&); |