diff options
author | Henning Baldersheim <balder@oath.com> | 2018-08-12 22:34:23 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-08-12 22:34:23 +0200 |
commit | fded37d945ca2539c96621b9ae33806ebbadf875 (patch) | |
tree | 2d66b6dadb6fc937471707038455a94ec50bfed0 /vespalib | |
parent | 21c4a91b55b57aad88fd95a0c9dbeedaa03600da (diff) |
Remove whitespace
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/io/fileutil.h | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/objects/nbostream.h | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/asciistream.h | 20 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/hash_fun.h | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/string.cpp | 4 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/string.h | 10 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/string.hpp | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/text/lowercase.cpp | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/text/lowercase.h | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/text/stringtokenizer.cpp | 6 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/text/stringtokenizer.h | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/util/regexp.cpp | 12 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/util/regexp.h | 10 |
13 files changed, 38 insertions, 38 deletions
diff --git a/vespalib/src/vespa/vespalib/io/fileutil.h b/vespalib/src/vespa/vespalib/io/fileutil.h index 9d7e64788a0..1507513dbbc 100644 --- a/vespalib/src/vespa/vespalib/io/fileutil.h +++ b/vespalib/src/vespa/vespalib/io/fileutil.h @@ -218,7 +218,7 @@ class LazyFile : public File { public: typedef std::unique_ptr<LazyFile> UP; - LazyFile(vespalib::stringref filename, int flags, + LazyFile(vespalib::stringref filename, int flags, bool autoCreateDirs = false) : File(filename), _flags(flags), diff --git a/vespalib/src/vespa/vespalib/objects/nbostream.h b/vespalib/src/vespa/vespalib/objects/nbostream.h index 8942004fadf..3109295fbdc 100644 --- a/vespalib/src/vespa/vespalib/objects/nbostream.h +++ b/vespalib/src/vespa/vespalib/objects/nbostream.h @@ -71,7 +71,7 @@ public: return *this; } nbostream & operator << (const char * v) { uint32_t sz(strlen(v)); (*this) << sz; write(v, sz); return *this; } - nbostream & operator << (vespalib::stringref v) { uint32_t sz(v.size()); (*this) << sz; write(v.data(), sz); return *this; } + nbostream & operator << (vespalib::stringref v) { uint32_t sz(v.size()); (*this) << sz; write(v.data(), sz); return *this; } nbostream & operator << (const vespalib::string & v) { uint32_t sz(v.size()); (*this) << sz; write(v.c_str(), sz); return *this; } nbostream & operator >> (vespalib::string & v) { uint32_t sz; (*this) >> sz; diff --git a/vespalib/src/vespa/vespalib/stllike/asciistream.h b/vespalib/src/vespa/vespalib/stllike/asciistream.h index 80523d5133d..c225c371a78 100644 --- a/vespalib/src/vespa/vespalib/stllike/asciistream.h +++ b/vespalib/src/vespa/vespalib/stllike/asciistream.h @@ -144,8 +144,8 @@ public: asciistream & operator << (Precision v); asciistream & operator >> (Precision v); void eatWhite(); - static asciistream createFromFile(stringref fileName); - static asciistream createFromDevice(stringref fileName); + static asciistream createFromFile(stringref fileName); + static asciistream createFromDevice(stringref fileName); string getline(char delim='\n'); std::vector<string> getlines(char delim='\n'); char getFill() const noexcept { return _fill; } @@ -166,15 +166,15 @@ private: } void write(const void * buf, size_t len); size_t length() const { return _rbuf.size(); } - size_t _rPos; - string _wbuf; - stringref _rbuf; - Base _base; - FloatSpec _floatSpec; + size_t _rPos; + string _wbuf; + stringref _rbuf; + Base _base; + FloatSpec _floatSpec; FloatModifier _floatModifier; - uint32_t _width; - char _fill; - uint8_t _precision; + uint32_t _width; + char _fill; + uint8_t _precision; }; ssize_t getline(asciistream & is, vespalib::string & line, char delim='\n'); diff --git a/vespalib/src/vespa/vespalib/stllike/hash_fun.h b/vespalib/src/vespa/vespalib/stllike/hash_fun.h index 5686871b91a..0342ea4cc69 100644 --- a/vespalib/src/vespa/vespalib/stllike/hash_fun.h +++ b/vespalib/src/vespa/vespalib/stllike/hash_fun.h @@ -67,7 +67,7 @@ template<> struct hash<const char *> { }; template<> struct hash<vespalib::stringref> { - size_t operator() (vespalib::stringref arg) const { return hashValue(arg.data(), arg.size()); } + size_t operator() (vespalib::stringref arg) const { return hashValue(arg.data(), arg.size()); } }; template<> struct hash<vespalib::string> { diff --git a/vespalib/src/vespa/vespalib/stllike/string.cpp b/vespalib/src/vespa/vespalib/stllike/string.cpp index 9001901bfd2..4ec324ceef0 100644 --- a/vespalib/src/vespa/vespalib/stllike/string.cpp +++ b/vespalib/src/vespa/vespalib/stllike/string.cpp @@ -69,7 +69,7 @@ template std::ostream & operator << (std::ostream & os, const string & v); template std::istream & operator >> (std::istream & is, string & v); string -operator + (stringref a, const char * b) +operator + (stringref a, const char * b) { string t(a); t += b; @@ -85,7 +85,7 @@ operator + (const char * a, stringref b) } string -operator + (stringref a, stringref b) +operator + (stringref a, stringref b) { string t(a); t += b; diff --git a/vespalib/src/vespa/vespalib/stllike/string.h b/vespalib/src/vespa/vespalib/stllike/string.h index 7fe18285966..e787ecc071f 100644 --- a/vespalib/src/vespa/vespalib/stllike/string.h +++ b/vespalib/src/vespa/vespalib/stllike/string.h @@ -327,13 +327,13 @@ public: small_string & push_back(char c) { return append(&c, 1); } small_string & append(char c) { return append(&c, 1); } small_string & append(const char * s) { return append(s, strlen(s)); } - small_string & append(stringref s) { return append(s.data(), s.size()); } + small_string & append(stringref s) { return append(s.data(), s.size()); } small_string & append(const std::string & s) { return append(s.data(), s.size()); } small_string & append(const small_string & s) { return append(s.data(), s.size()); } small_string & append(const void * s, size_type sz); small_string & operator += (char c) { return append(c); } small_string & operator += (const char * s) { return append(s); } - small_string & operator += (stringref s) { return append(s); } + small_string & operator += (stringref s) { return append(s); } small_string & operator += (const std::string & s) { return append(s); } small_string & operator += (const small_string & s) { return append(s); } @@ -581,7 +581,7 @@ operator + (const small_string<StackSize> & a, stringref b); template<uint32_t StackSize> small_string<StackSize> -operator + (stringref a, const small_string<StackSize> & b); +operator + (stringref a, const small_string<StackSize> & b); template<uint32_t StackSize> small_string<StackSize> @@ -612,9 +612,9 @@ operator < (const T& a, const small_string<StackSize>& b) return b > a; } -string operator + (stringref a, stringref b); +string operator + (stringref a, stringref b); string operator + (const char * a, stringref b); -string operator + (stringref a, const char * b); +string operator + (stringref a, const char * b); inline bool contains(stringref text, stringref key) { return text.find(key) != stringref::npos; diff --git a/vespalib/src/vespa/vespalib/stllike/string.hpp b/vespalib/src/vespa/vespalib/stllike/string.hpp index 7f4a0baa64a..bf98d82463b 100644 --- a/vespalib/src/vespa/vespalib/stllike/string.hpp +++ b/vespalib/src/vespa/vespalib/stllike/string.hpp @@ -175,7 +175,7 @@ operator + (const small_string<StackSize> & a, stringref b) template<uint32_t StackSize> small_string<StackSize> -operator + (stringref a, const small_string<StackSize> & b) +operator + (stringref a, const small_string<StackSize> & b) { small_string<StackSize> t(a); t += b; diff --git a/vespalib/src/vespa/vespalib/text/lowercase.cpp b/vespalib/src/vespa/vespalib/text/lowercase.cpp index f62433c8cda..7296819084b 100644 --- a/vespalib/src/vespa/vespalib/text/lowercase.cpp +++ b/vespalib/src/vespa/vespalib/text/lowercase.cpp @@ -6,7 +6,7 @@ namespace vespalib { vespalib::string -LowerCase::convert(vespalib::stringref input) +LowerCase::convert(vespalib::stringref input) { vespalib::string output; Utf8Reader r(input); diff --git a/vespalib/src/vespa/vespalib/text/lowercase.h b/vespalib/src/vespa/vespalib/text/lowercase.h index e628114c663..d007ac37b3e 100644 --- a/vespalib/src/vespa/vespalib/text/lowercase.h +++ b/vespalib/src/vespa/vespalib/text/lowercase.h @@ -102,7 +102,7 @@ public: * any bytes that aren't valid UTF-8 with the Unicode REPLACEMENT * CHARACTER (U+FFFD). **/ - static vespalib::string convert(vespalib::stringref input); + static vespalib::string convert(vespalib::stringref input); }; diff --git a/vespalib/src/vespa/vespalib/text/stringtokenizer.cpp b/vespalib/src/vespa/vespalib/text/stringtokenizer.cpp index 0191fdf7929..619decdce02 100644 --- a/vespalib/src/vespa/vespalib/text/stringtokenizer.cpp +++ b/vespalib/src/vespa/vespalib/text/stringtokenizer.cpp @@ -7,7 +7,7 @@ namespace { class AsciiSet { public: - AsciiSet(vespalib::stringref s) { + AsciiSet(vespalib::stringref s) { memset(_set, 0, sizeof(_set)); for (size_t i(0), m(s.size()); i < m; i++) { add(s[i]); @@ -31,7 +31,7 @@ typedef vespalib::StringTokenizer::TokenList TokenList; * strip leading and trailing sequences * of characters contained in the strip set. **/ -Token stripString(vespalib::stringref source, +Token stripString(vespalib::stringref source, const AsciiSet & strip) { Token::size_type start = 0; @@ -66,7 +66,7 @@ void parse(TokenList& output, namespace vespalib { -StringTokenizer::StringTokenizer(vespalib::stringref source, +StringTokenizer::StringTokenizer(vespalib::stringref source, vespalib::stringref separators, vespalib::stringref strip) : _tokens() diff --git a/vespalib/src/vespa/vespalib/text/stringtokenizer.h b/vespalib/src/vespa/vespalib/text/stringtokenizer.h index 5375a251b1b..f1111eee7de 100644 --- a/vespalib/src/vespa/vespalib/text/stringtokenizer.h +++ b/vespalib/src/vespa/vespalib/text/stringtokenizer.h @@ -41,7 +41,7 @@ public: * @param separators The characters to be used as token separators * @param strip Characters to be stripped from both ends of each token **/ - StringTokenizer(vespalib::stringref source, + StringTokenizer(vespalib::stringref source, vespalib::stringref separators = ",", vespalib::stringref strip = " \t\f\r\n"); diff --git a/vespalib/src/vespa/vespalib/util/regexp.cpp b/vespalib/src/vespa/vespalib/util/regexp.cpp index 85079383c8c..684ed1b8fd8 100644 --- a/vespalib/src/vespa/vespalib/util/regexp.cpp +++ b/vespalib/src/vespa/vespalib/util/regexp.cpp @@ -24,7 +24,7 @@ Regexp::Flags::enableICASE() } bool -Regexp::compile(vespalib::stringref re, Flags flags) +Regexp::compile(vespalib::stringref re, Flags flags) { re_set_syntax(flags.flags()); regex_t *preg = (regex_t *)_data; @@ -45,7 +45,7 @@ Regexp::compile(vespalib::stringref re, Flags flags) } -Regexp::Regexp(vespalib::stringref re, Flags flags) +Regexp::Regexp(vespalib::stringref re, Flags flags) : _valid(false), _data(new regex_t) { @@ -53,7 +53,7 @@ Regexp::Regexp(vespalib::stringref re, Flags flags) } bool -Regexp::match(vespalib::stringref s) const +Regexp::match(vespalib::stringref s) const { if ( ! valid() ) { return false; } regex_t *preg = const_cast<regex_t *>(static_cast<const regex_t *>(_data)); @@ -64,7 +64,7 @@ Regexp::match(vespalib::stringref s) const return pos >= 0; } -vespalib::string Regexp::replace(vespalib::stringref s, vespalib::stringref replacement) const +vespalib::string Regexp::replace(vespalib::stringref s, vespalib::stringref replacement) const { if ( ! valid() ) { return s; } regex_t *preg = const_cast<regex_t *>(static_cast<const regex_t *>(_data)); @@ -92,7 +92,7 @@ Regexp::~Regexp() namespace { -bool has_option(vespalib::stringref re) { +bool has_option(vespalib::stringref re) { return (re.find('|') != re.npos); } @@ -119,7 +119,7 @@ vespalib::string escape(vespalib::stringref str) { } // namespace vespalib::<unnamed> vespalib::string -Regexp::get_prefix(vespalib::stringref re) +Regexp::get_prefix(vespalib::stringref re) { vespalib::string prefix; if ((re.size() > 0) && (re.data()[0] == '^') && !has_option(re)) { diff --git a/vespalib/src/vespa/vespalib/util/regexp.h b/vespalib/src/vespa/vespalib/util/regexp.h index c9500b39099..6a97b72cdda 100644 --- a/vespalib/src/vespa/vespalib/util/regexp.h +++ b/vespalib/src/vespa/vespalib/util/regexp.h @@ -38,7 +38,7 @@ public: * @throw IllegalArgumentException if the RE is invalid. * @param re Regular expression. **/ - Regexp(vespalib::stringref re, Flags=Flags()); + Regexp(vespalib::stringref re, Flags=Flags()); ~Regexp(); @@ -54,7 +54,7 @@ public: * @param s text to search for a match. * @return true if a match was found. **/ - bool match(vespalib::stringref s) const; + bool match(vespalib::stringref s) const; /** * Will replace all occurrences of this pattern is string 's' with 'replacement'. @@ -63,7 +63,7 @@ public: * @param replacement text to replace the pattern. * @return modified string. **/ - vespalib::string replace(vespalib::stringref s, vespalib::stringref replacement) const; + vespalib::string replace(vespalib::stringref s, vespalib::stringref replacement) const; /** * Look at the given regular expression and identify the prefix @@ -75,7 +75,7 @@ public: * @param re Regular expression. * @return prefix that must be present in matching strings **/ - static vespalib::string get_prefix(vespalib::stringref re); + static vespalib::string get_prefix(vespalib::stringref re); /** * Make a regexp matching strings with the given prefix. @@ -104,7 +104,7 @@ public: private: bool _valid; void *_data; - bool compile(vespalib::stringref re, Flags flags); + bool compile(vespalib::stringref re, Flags flags); }; } // namespace vespalib |