diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-26 14:12:56 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-30 13:04:37 +0300 |
commit | d90ac405ae50f84a3cf4ba0b806cca1c89f81cff (patch) | |
tree | 3f66be39a80a0a32cbba332e34b418fa1fc9ad02 /build2/bash/utility.hxx | |
parent | e92a1aab0e1c7c9ba8e6ab9a7049207468ca53fc (diff) |
Make project variable to be of project_name type
Diffstat (limited to 'build2/bash/utility.hxx')
-rw-r--r-- | build2/bash/utility.hxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/build2/bash/utility.hxx b/build2/bash/utility.hxx index d8d9a43..67f4552 100644 --- a/build2/bash/utility.hxx +++ b/build2/bash/utility.hxx @@ -14,13 +14,12 @@ namespace build2 { // Strip the .bash extension from the project name. // + // Note that the result may not be a valid project name. + // inline string - project_base (const string& n) + project_base (const project_name& pn) { - size_t p (path::traits::find_extension (n)); - return p == string::npos || casecmp (n.c_str () + p, ".bash", 5) != 0 - ? n - : string (n, 0, p); + return pn.base ("bash"); } } } |