From 6ccb5835ff55d85156be91473c598eca9d6cb9a6 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Wed, 4 Nov 2020 16:57:41 +0100 Subject: Revert "Make Lint Happy" This reverts commit ad148587dcf5244c2d2011dba339786c765c54c4. --- src/util/strfnd.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/util/strfnd.h') diff --git a/src/util/strfnd.h b/src/util/strfnd.h index 92fbbaf07..96cf1b458 100644 --- a/src/util/strfnd.h +++ b/src/util/strfnd.h @@ -21,19 +21,14 @@ with this program; if not, write to the Free Software Foundation, Inc., #include -template class BasicStrfnd -{ +template +class BasicStrfnd { typedef std::basic_string String; String str; size_t pos; - public: BasicStrfnd(const String &s) : str(s), pos(0) {} - void start(const String &s) - { - str = s; - pos = 0; - } + void start(const String &s) { str = s; pos = 0; } size_t where() { return pos; } void to(size_t i) { pos = i; } bool at_end() { return pos >= str.size(); } @@ -53,9 +48,8 @@ public: return ret; } - // Returns substr up to the next occurence of sep that isn't escaped with esc - // ('\\') - String next_esc(const String &sep, T esc = static_cast('\\')) + // Returns substr up to the next occurence of sep that isn't escaped with esc ('\\') + String next_esc(const String &sep, T esc=static_cast('\\')) { if (pos >= str.size()) return String(); -- cgit v1.2.3