diff --git a/common/base-str.cpp b/common/base-str.cpp index 2439c2931a1..581c65e0e89 100644 --- a/common/base-str.cpp +++ b/common/base-str.cpp @@ -542,7 +542,7 @@ TEMPLATE void BASESTRING::insertString(const value_type *s, uint32 p) { } TEMPLATE void BASESTRING::insertString(const BaseString &s, uint32 p) { - for (uint i = 0; i < s._size; i++) { + for (uint i = 0; i < s._size; i++) { BaseString::insertChar(s[i], p+i); } } @@ -583,7 +583,7 @@ TEMPLATE uint32 BASESTRING::find(const BaseString &str, uint32 pos) const { } TEMPLATE size_t BASESTRING::find(const value_type *strP, uint32 pos) const { - if (pos >= _size) { + if (pos >= _size) { return npos; } @@ -699,7 +699,7 @@ TEMPLATE void BASESTRING::toLowercase() { TEMPLATE void BASESTRING::toUppercase() { makeUnique(); for (uint32 i = 0; i < _size; ++i) { - if (_str[i] > 0 && _str[i] < 128) { + if (_str[i] > 0 && _str[i] < 128) { _str[i] = toupper(_str[i]); } } @@ -740,7 +740,7 @@ TEMPLATE void BASESTRING::assignAppend(value_type c) { } TEMPLATE void BASESTRING::assignAppend(const BaseString &str) { - if (&str == this) { + if (&str == this) { assignAppend(BaseString(str)); return; } diff --git a/common/base-str.h b/common/base-str.h index b3119322e2e..f95faa4f7a1 100644 --- a/common/base-str.h +++ b/common/base-str.h @@ -32,9 +32,9 @@ namespace Common { template class BaseString { public: - static void releaseMemoryPoolMutex(); + static void releaseMemoryPoolMutex(); - static const uint32 npos = 0xFFFFFFFF; + static const uint32 npos = 0xFFFFFFFF; typedef T value_type; typedef T * iterator; typedef const T * const_iterator; @@ -119,7 +119,7 @@ public: bool equalsC(const char *x) const; int compareTo(const BaseString &x) const; // strcmp clone int compareTo(const value_type *x) const; // strcmp clone - int compareToC(const char *x) const; // strcmp clone + int compareToC(const char *x) const; // strcmp clone /** Set character c at position p, replacing the previous character there. */ void setChar(value_type c, uint32 p); @@ -165,7 +165,7 @@ public: return begin() + size(); } - inline const value_type *c_str() const { return _str; } + inline const value_type *c_str() const { return _str; } inline uint size() const { return _size; } inline bool empty() const { return (_size == 0); } @@ -185,16 +185,16 @@ public: /** Insert character c before position p. */ void insertChar(value_type c, uint32 p); - void insertString(const value_type *s, uint32 p); + void insertString(const value_type *s, uint32 p); void insertString(const BaseString &s, uint32 p); - /** Finds the index of a character in the string */ - uint32 find(value_type x, uint32 pos = 0) const; - /** Does a find for the passed string */ + /** Finds the index of a character in the string */ + uint32 find(value_type x, uint32 pos = 0) const; + /** Does a find for the passed string */ size_t find(const value_type *s, uint32 pos = 0) const; uint32 find(const BaseString &str, uint32 pos = 0) const; - /** + /** * Wraps the text in the string to the given line maximum. Lines will be * broken at any whitespace character. New lines are assumed to be * represented using '\n'. @@ -205,12 +205,12 @@ public: */ void wordWrap(const uint32 maxLength); - /** Return uint64 corrensponding to String's contents. */ + /** Return uint64 corrensponding to String's contents. */ uint64 asUint64() const; - /** Return uint64 corrensponding to String's contents. This variant recognizes 0 (oct) and 0x (hex) prefixes. */ + /** Return uint64 corrensponding to String's contents. This variant recognizes 0 (oct) and 0x (hex) prefixes. */ uint64 asUint64Ext() const; - + /** * Convert all characters in the string to lowercase. * diff --git a/common/ustr.h b/common/ustr.h index 76acc80fc02..c3cb5c6049e 100644 --- a/common/ustr.h +++ b/common/ustr.h @@ -114,8 +114,8 @@ public: bool operator!=(const String &x) const; bool operator!=(const char *x) const; - /** Python-like method **/ - String encode(CodePage page = kUtf8) const; + /** Python-like method **/ + String encode(CodePage page = kUtf8) const; /** * Print formatted data into a U32String object. @@ -139,7 +139,7 @@ public: void insertString(const char *s, uint32 p); void insertString(const String &s, uint32 p); - /** Return a substring of this string */ + /** Return a substring of this string */ U32String substr(size_t pos = 0, size_t len = npos) const; const uint32 *u32_str() const {