eolian-cxx: Simply use find_replace instead of long form.
authorSavio Sena <savio@expertisesolutions.com.br>
Fri, 12 Sep 2014 19:41:33 +0000 (16:41 -0300)
committerSavio Sena <savio@expertisesolutions.com.br>
Fri, 12 Sep 2014 19:41:33 +0000 (16:41 -0300)
src/bin/eolian_cxx/eolian_wrappers.hh

index 6144f9d..1a90c86 100644 (file)
@@ -84,13 +84,8 @@ class_eo_name(Eolian_Class const& klass)
         default:
            break;
      }
-   std::string s = class_full_name(klass) + "_" + suffix;
-   std::transform(s.begin(), s.end(), s.begin(),
-                  [](int c)
-                  {
-                     return c == '.' ? '_' : c ;
-                  });
-   return safe_upper(s);
+   return safe_upper
+     (find_replace(class_full_name(klass) + "_" + suffix, ".", "_"));
 }
 
 inline std::string