diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-06-22 09:24:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-06-22 09:24:12 +0200 |
commit | 6ecaa7e76c91a2842bcc63626a908bb2340b77b6 (patch) | |
tree | aa0e3d8d5f9f791dfa1735ce7d8cc276a2c0baf3 /build/prerequisite | |
parent | 82ad80de9a967f253026c4874b47486c69402288 (diff) |
Remove prerequisite rewriting for c/cxx chaining
Diffstat (limited to 'build/prerequisite')
-rw-r--r-- | build/prerequisite | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/build/prerequisite b/build/prerequisite index 0d3428f..529b225 100644 --- a/build/prerequisite +++ b/build/prerequisite @@ -69,6 +69,13 @@ namespace build target_type* target; // NULL if not yet resolved. Note that this should // always be the "primary target", not a member of // a target group. + + prerequisite_key + key () const + { + return prerequisite_key {{&type, &dir, &name, &ext}, &scope}; + } + public: // Prerequisite (target) type. // @@ -80,15 +87,13 @@ namespace build inline bool operator< (const prerequisite& x, const prerequisite& y) { - return prerequisite_key {{&x.type, &x.dir, &x.name, &x.ext}, &x.scope} < - prerequisite_key {{&y.type, &y.dir, &y.name, &y.ext}, &y.scope}; + return x.key () < y.key (); } inline std::ostream& operator<< (std::ostream& os, const prerequisite& p) { - return os << - prerequisite_key {{&p.type, &p.dir, &p.name, &p.ext}, &p.scope}; + return os << p.key (); } // Set of prerequisites in a scope. |