From e3e597180487328a54721e2afb95e33ed853d586 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 1 Feb 2017 16:36:24 +0200 Subject: Pass const scope& where modification should not happen --- build2/target | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'build2/target') diff --git a/build2/target b/build2/target index 30dffab..05e4281 100644 --- a/build2/target +++ b/build2/target @@ -256,7 +256,7 @@ namespace build2 public: // Most qualified scope that contains this target. // - scope& + const scope& base_scope () const; // Root scope of a project that contains this target. Note that @@ -264,19 +264,19 @@ namespace build2 // this function asserts. If you need to detect this situation, // then use base_scope().root_scope() expression instead. // - scope& + const scope& root_scope () const; // Root scope of a strong amalgamation that contains this target. // The same notes as to root_scope() apply. // - scope& + const scope& strong_scope () const {return *root_scope ().strong_scope ();} // Root scope of the outermost amalgamation that contains this target. // The same notes as to root_scope() apply. // - scope& + const scope& weak_scope () const {return *root_scope ().weak_scope ();} bool @@ -1356,24 +1356,24 @@ namespace build2 // template optional - target_extension_fix (const target_key&, scope&, bool); + target_extension_fix (const target_key&, const scope&, bool); // Get the extension from the variable or use the default if none set. If // the default is NULL, then return NULL. // template optional - target_extension_var (const target_key&, scope&, bool); + target_extension_var (const target_key&, const scope&, bool); // Always return NULL extension. // optional - target_extension_null (const target_key&, scope&, bool); + target_extension_null (const target_key&, const scope&, bool); // Assert if called. // optional - target_extension_assert (const target_key&, scope&, bool); + target_extension_assert (const target_key&, const scope&, bool); // Target print functions. // -- cgit v1.1