diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-12-06 10:48:19 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-12-06 14:54:07 +0200 |
commit | b6dd6fce4a0929d6fb9e419d5960ad5d59bf8add (patch) | |
tree | f7adb71492352bcadf7d743bca42bd66c7a4b471 | |
parent | e9a2eb940d6de2afdb70acba1da0e5a412637906 (diff) |
-rw-r--r-- | bdep/http-service.cxx | 2 | ||||
-rw-r--r-- | bdep/new.cxx | 12 | ||||
-rw-r--r-- | bdep/utility.hxx | 3 |
3 files changed, 8 insertions, 9 deletions
diff --git a/bdep/http-service.cxx b/bdep/http-service.cxx index dc04bd9..e1396a2 100644 --- a/bdep/http-service.cxx +++ b/bdep/http-service.cxx @@ -374,7 +374,7 @@ namespace bdep message = "HTTP status code " + to_string (rs.code); if (!rs.reason.empty ()) - message += " (" + lcase (rs.reason) + ')'; + message += " (" + make_lcase (rs.reason) + ')'; } if (!location) diff --git a/bdep/new.cxx b/bdep/new.cxx index be31121..5e63820 100644 --- a/bdep/new.cxx +++ b/bdep/new.cxx @@ -277,7 +277,7 @@ namespace bdep { // Uppercase the first letter. // - ucase (l, 0, 1); + make_ucase (l, 0, 1); } return l; @@ -981,7 +981,7 @@ cmd_new (cmd_new_options&& o, cli::group_scanner& args) case lang::c: case lang::cxx: { - id = sanitize_identifier (const_cast<const string&> (s)); + id = sanitize_identifier (s); break; } } @@ -1483,10 +1483,7 @@ cmd_new (cmd_new_options&& o, cli::group_scanner& args) auto add_var = [&subs, &vars] (string name, string value) { - vars.push_back ("BDEP_NEW_" + - ucase (const_cast<const string&> (name)) + - '=' + - value); + vars.push_back ("BDEP_NEW_" + ucase (name) + '=' + value); subs[move (name)] = move (value); }; @@ -2816,8 +2813,7 @@ cmd_new (cmd_new_options&& o, cli::group_scanner& args) // to minimize the potential macro name clash. // string mx ( - sanitize_identifier ( - ucase (const_cast<const string&> (!ip.empty () ? ip : n)))); + sanitize_identifier (ucase (!ip.empty () ? ip : n))); // Strip the trailing underscore (produced from slash). // diff --git a/bdep/utility.hxx b/bdep/utility.hxx index 3438fed..9c26d3a 100644 --- a/bdep/utility.hxx +++ b/bdep/utility.hxx @@ -43,7 +43,9 @@ namespace bdep // <libbutl/utility.hxx> // using butl::ucase; + using butl::make_ucase; using butl::lcase; + using butl::make_lcase; using butl::icasecmp; using butl::alpha; @@ -52,6 +54,7 @@ namespace bdep using butl::trim; using butl::next_word; using butl::sanitize_identifier; + using butl::make_sanitized_identifier; using butl::reverse_iterate; |