utils: small optimization in utf8_flatten

In the common path, avoid building an unneeded std::string. This should
up in some profiles.
This commit is contained in:
djcb
2019-03-23 17:00:25 +02:00
parent f9b615c3bb
commit da10f30adf
2 changed files with 13 additions and 18 deletions

View File

@ -32,7 +32,9 @@ namespace Mux {
*
* @return a flattened string
*/
std::string utf8_flatten (const std::string& str);
std::string utf8_flatten (const char *str);
inline std::string utf8_flatten (const std::string& s) { return utf8_flatten(s.c_str()); }
/**