From 19c37866524f60a7710b256dd13bf1da9f8cff16 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 23 Jan 2016 11:12:47 +0200 Subject: Change target_key::ext from pointer to pointer to reference to pointer Probably can also do for the rest of the target_key members. --- build2/target-key | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'build2/target-key') diff --git a/build2/target-key b/build2/target-key index 2bbc2b2..4246cf2 100644 --- a/build2/target-key +++ b/build2/target-key @@ -22,10 +22,10 @@ namespace build2 class target_key { public: - mutable const target_type* type; - mutable const dir_path* dir; - mutable const std::string* name; - mutable const std::string* const* ext; // Note: only *ext can be NULL. + const target_type* const type; + const dir_path* const dir; + const std::string* const name; + const std::string* const& ext; friend bool operator< (const target_key& x, const target_key& y) @@ -44,7 +44,7 @@ namespace build2 (xt == yt && *x.name < *y.name) || (xt == yt && *x.name == *y.name && *x.dir < *y.dir) || (xt == yt && *x.name == *y.name && *x.dir == *y.dir && - *x.ext != nullptr && *y.ext != nullptr && **x.ext < **y.ext); + x.ext != nullptr && y.ext != nullptr && *x.ext < *y.ext); } }; -- cgit v1.1