From 92f636be39391b06893e0d3fdc97c86e980b8a6f Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Fri, 28 Aug 2020 09:24:04 +0200 Subject: [PATCH] shared --- src/utils/smallut.h | 4 ++-- src/utils/utf8iter.cpp | 4 ++-- src/utils/utf8iter.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utils/smallut.h b/src/utils/smallut.h index 4b4df678..2c5fc492 100644 --- a/src/utils/smallut.h +++ b/src/utils/smallut.h @@ -57,9 +57,9 @@ struct StringIcmpPred { const std::string& m_s1; }; -extern int stringlowercmp(const std::string& s1, +extern int stringlowercmp(const std::string& s1, // already lower const std::string& s2); -extern int stringuppercmp(const std::string& s1, +extern int stringuppercmp(const std::string& s1, // already upper const std::string& s2); extern void stringtolower(std::string& io); diff --git a/src/utils/utf8iter.cpp b/src/utils/utf8iter.cpp index 64e4661d..bf2eec16 100644 --- a/src/utils/utf8iter.cpp +++ b/src/utils/utf8iter.cpp @@ -22,8 +22,8 @@ using namespace std; -void utf8truncate(std::string& s, int maxlen, int flags, string ellipsis, - string ws) +void utf8truncate(std::string& s, int maxlen, int flags, const string& ellipsis, + const string& ws) { if (s.size() <= string::size_type(maxlen)) { return; diff --git a/src/utils/utf8iter.h b/src/utils/utf8iter.h index 0d7e6391..dc61eaaa 100644 --- a/src/utils/utf8iter.h +++ b/src/utils/utf8iter.h @@ -283,8 +283,8 @@ private: enum Utf8TruncateFlag {UTF8T_NONE, UTF8T_ATWORD, UTF8T_ELLIPSIS}; // maxlen is in utf-8 chars. extern void utf8truncate(std::string& s, int maxlen, int flags = 0, - std::string ellipsis = "...", - std::string ws = " \t\n\r"); + const std::string& ellipsis = "...", + const std::string& ws = " \t\n\r"); extern size_t utf8len(const std::string& s); /** @brief Check and possibly fix string by replacing badly encoded