From 1d876b1360a9be46570360beb0bd8138557ff0da Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 22 Aug 2019 11:41:03 +0300 Subject: Make use of sanitize_identifier() --- libbutl/project-name.cxx | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'libbutl/project-name.cxx') diff --git a/libbutl/project-name.cxx b/libbutl/project-name.cxx index 4c04e5f..a1767e9 100644 --- a/libbutl/project-name.cxx +++ b/libbutl/project-name.cxx @@ -10,8 +10,7 @@ #include #include #include // move() -#include // back_inserter -#include // find(), transform() +#include // find() #include // invalid_argument #endif @@ -103,19 +102,4 @@ namespace butl size_t p (path::traits_type::find_extension (value_)); return p != string::npos ? string (value_, p + 1) : string (); } - - string project_name:: - variable () const - { - using std::string; - - auto sanitize = [] (char c) - { - return (c == '-' || c == '+' || c == '.') ? '_' : c; - }; - - string r; - transform (value_.begin (), value_.end (), back_inserter (r), sanitize); - return r; - } } -- cgit v1.1