Apply clang-format to all C, C++ and ObjC files (issue #2171)

This commit is contained in:
Marshall Greenblatt
2017-05-17 11:29:28 +02:00
parent a566549e04
commit 31d9407ee2
1331 changed files with 33014 additions and 32258 deletions

View File

@ -112,26 +112,19 @@ struct string16_char_traits {
typedef mbstate_t state_type;
typedef std::fpos<state_type> pos_type;
static void assign(char_type& c1, const char_type& c2) {
c1 = c2;
}
static void assign(char_type& c1, const char_type& c2) { c1 = c2; }
static bool eq(const char_type& c1, const char_type& c2) {
return c1 == c2;
}
static bool lt(const char_type& c1, const char_type& c2) {
return c1 < c2;
}
static bool eq(const char_type& c1, const char_type& c2) { return c1 == c2; }
static bool lt(const char_type& c1, const char_type& c2) { return c1 < c2; }
static int compare(const char_type* s1, const char_type* s2, size_t n) {
return c16memcmp(s1, s2, n);
}
static size_t length(const char_type* s) {
return c16len(s);
}
static size_t length(const char_type* s) { return c16len(s); }
static const char_type* find(const char_type* s, size_t n,
static const char_type* find(const char_type* s,
size_t n,
const char_type& a) {
return c16memchr(s, a, n);
}
@ -152,21 +145,15 @@ struct string16_char_traits {
return eq_int_type(c, eof()) ? 0 : c;
}
static char_type to_char_type(const int_type& c) {
return char_type(c);
}
static char_type to_char_type(const int_type& c) { return char_type(c); }
static int_type to_int_type(const char_type& c) {
return int_type(c);
}
static int_type to_int_type(const char_type& c) { return int_type(c); }
static bool eq_int_type(const int_type& c1, const int_type& c2) {
return c1 == c2;
}
static int_type eof() {
return static_cast<int_type>(EOF);
}
static int_type eof() { return static_cast<int_type>(EOF); }
};
typedef std::basic_string<char16, base::string16_char_traits> string16;
@ -217,8 +204,8 @@ extern void PrintTo(const string16& str, std::ostream* out);
//
// TODO(mark): File this bug with Apple and update this note with a bug number.
extern template
class std::basic_string<base::char16, base::string16_char_traits>;
extern template class std::basic_string<base::char16,
base::string16_char_traits>;
#endif // WCHAR_T_IS_UTF32