From f9ad47ad11f1166b038a57ad5d3691414c05b050 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 22 Aug 2019 12:48:16 +0300 Subject: Make use of butl::sanitize_identifier() --- build2/cc/common.cxx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/build2/cc/common.cxx b/build2/cc/common.cxx index aa0ff59..aa0eb89 100644 --- a/build2/cc/common.cxx +++ b/build2/cc/common.cxx @@ -910,15 +910,8 @@ namespace build2 // string d ("-DLIB"); - auto upcase_sanitize = [] (char c) - { - return (c == '-' || c == '+' || c == '.') ? '_' : ucase (c); - }; - - transform (t.name.begin (), - t.name.end (), - back_inserter (d), - upcase_sanitize); + d += sanitize_identifier ( + ucase (const_cast (t.name))); d += '_'; d += suffix; -- cgit v1.1