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

@ -4,20 +4,14 @@
#include "include/test/cef_translator_test.h"
class CefTranslatorTestRefPtrLibraryImpl :
public CefTranslatorTestRefPtrLibrary {
class CefTranslatorTestRefPtrLibraryImpl
: public CefTranslatorTestRefPtrLibrary {
public:
explicit CefTranslatorTestRefPtrLibraryImpl(int value)
: value_(value) {
}
explicit CefTranslatorTestRefPtrLibraryImpl(int value) : value_(value) {}
int GetValue() override {
return value_;
}
int GetValue() override { return value_; }
void SetValue(int value) override {
value_ = value;
}
void SetValue(int value) override { value_ = value; }
protected:
int value_;
@ -33,29 +27,19 @@ CefTranslatorTestRefPtrLibrary::Create(int value) {
return new CefTranslatorTestRefPtrLibraryImpl(value);
}
class CefTranslatorTestRefPtrLibraryChildImpl :
public CefTranslatorTestRefPtrLibraryChild {
class CefTranslatorTestRefPtrLibraryChildImpl
: public CefTranslatorTestRefPtrLibraryChild {
public:
CefTranslatorTestRefPtrLibraryChildImpl(int value, int other_value)
: value_(value),
other_value_(other_value) {
}
: value_(value), other_value_(other_value) {}
int GetValue() override {
return value_;
}
int GetValue() override { return value_; }
void SetValue(int value) override {
value_ = value;
}
void SetValue(int value) override { value_ = value; }
int GetOtherValue() override {
return other_value_;
}
int GetOtherValue() override { return other_value_; }
void SetOtherValue(int value) override {
other_value_ = value;
}
void SetOtherValue(int value) override { other_value_ = value; }
protected:
int value_;
@ -68,46 +52,31 @@ class CefTranslatorTestRefPtrLibraryChildImpl :
// static
CefRefPtr<CefTranslatorTestRefPtrLibraryChild>
CefTranslatorTestRefPtrLibraryChild::Create(
int value,
int other_value) {
CefTranslatorTestRefPtrLibraryChild::Create(int value, int other_value) {
return new CefTranslatorTestRefPtrLibraryChildImpl(value, other_value);
}
class CefTranslatorTestRefPtrLibraryChildChildImpl :
public CefTranslatorTestRefPtrLibraryChildChild {
class CefTranslatorTestRefPtrLibraryChildChildImpl
: public CefTranslatorTestRefPtrLibraryChildChild {
public:
CefTranslatorTestRefPtrLibraryChildChildImpl(int value,
int other_value,
int other_other_value)
: value_(value),
other_value_(other_value),
other_other_value_(other_other_value) {
}
int other_value,
int other_other_value)
: value_(value),
other_value_(other_value),
other_other_value_(other_other_value) {}
int GetValue() override {
return value_;
}
int GetValue() override { return value_; }
void SetValue(int value) override {
value_ = value;
}
void SetValue(int value) override { value_ = value; }
int GetOtherValue() override {
return other_value_;
}
int GetOtherValue() override { return other_value_; }
void SetOtherValue(int value) override {
other_value_ = value;
}
void SetOtherValue(int value) override { other_value_ = value; }
int GetOtherOtherValue() override {
return other_other_value_;
}
int GetOtherOtherValue() override { return other_other_value_; }
void SetOtherOtherValue(int value) override {
other_other_value_ = value;
}
void SetOtherOtherValue(int value) override { other_other_value_ = value; }
protected:
int value_;
@ -121,29 +90,21 @@ class CefTranslatorTestRefPtrLibraryChildChildImpl :
// static
CefRefPtr<CefTranslatorTestRefPtrLibraryChildChild>
CefTranslatorTestRefPtrLibraryChildChild::Create(
int value,
int other_value,
int other_other_value) {
CefTranslatorTestRefPtrLibraryChildChild::Create(int value,
int other_value,
int other_other_value) {
return new CefTranslatorTestRefPtrLibraryChildChildImpl(value, other_value,
other_other_value);
}
class CefTranslatorTestScopedLibraryImpl :
public CefTranslatorTestScopedLibrary {
class CefTranslatorTestScopedLibraryImpl
: public CefTranslatorTestScopedLibrary {
public:
explicit CefTranslatorTestScopedLibraryImpl(int value)
: value_(value) {
}
explicit CefTranslatorTestScopedLibraryImpl(int value) : value_(value) {}
int GetValue() override {
return value_;
}
int GetValue() override { return value_; }
void SetValue(int value) override {
value_ = value;
}
void SetValue(int value) override { value_ = value; }
protected:
int value_;
@ -159,29 +120,19 @@ CefTranslatorTestScopedLibrary::Create(int value) {
new CefTranslatorTestScopedLibraryImpl(value));
}
class CefTranslatorTestScopedLibraryChildImpl :
public CefTranslatorTestScopedLibraryChild {
class CefTranslatorTestScopedLibraryChildImpl
: public CefTranslatorTestScopedLibraryChild {
public:
CefTranslatorTestScopedLibraryChildImpl(int value, int other_value)
: value_(value),
other_value_(other_value) {
}
: value_(value), other_value_(other_value) {}
int GetValue() override {
return value_;
}
int GetValue() override { return value_; }
void SetValue(int value) override {
value_ = value;
}
void SetValue(int value) override { value_ = value; }
int GetOtherValue() override {
return other_value_;
}
int GetOtherValue() override { return other_value_; }
void SetOtherValue(int value) override {
other_value_ = value;
}
void SetOtherValue(int value) override { other_value_ = value; }
protected:
int value_;
@ -193,47 +144,32 @@ class CefTranslatorTestScopedLibraryChildImpl :
// static
CefOwnPtr<CefTranslatorTestScopedLibraryChild>
CefTranslatorTestScopedLibraryChild::Create(
int value,
int other_value) {
CefTranslatorTestScopedLibraryChild::Create(int value, int other_value) {
return CefOwnPtr<CefTranslatorTestScopedLibraryChild>(
new CefTranslatorTestScopedLibraryChildImpl(value, other_value));
}
class CefTranslatorTestScopedLibraryChildChildImpl :
public CefTranslatorTestScopedLibraryChildChild {
class CefTranslatorTestScopedLibraryChildChildImpl
: public CefTranslatorTestScopedLibraryChildChild {
public:
CefTranslatorTestScopedLibraryChildChildImpl(int value,
int other_value,
int other_other_value)
: value_(value),
other_value_(other_value),
other_other_value_(other_other_value) {
}
: value_(value),
other_value_(other_value),
other_other_value_(other_other_value) {}
int GetValue() override {
return value_;
}
int GetValue() override { return value_; }
void SetValue(int value) override {
value_ = value;
}
void SetValue(int value) override { value_ = value; }
int GetOtherValue() override {
return other_value_;
}
int GetOtherValue() override { return other_value_; }
void SetOtherValue(int value) override {
other_value_ = value;
}
void SetOtherValue(int value) override { other_value_ = value; }
int GetOtherOtherValue() override {
return other_other_value_;
}
int GetOtherOtherValue() override { return other_other_value_; }
void SetOtherOtherValue(int value) override {
other_other_value_ = value;
}
void SetOtherOtherValue(int value) override { other_other_value_ = value; }
protected:
int value_;
@ -246,70 +182,43 @@ class CefTranslatorTestScopedLibraryChildChildImpl :
// static
CefOwnPtr<CefTranslatorTestScopedLibraryChildChild>
CefTranslatorTestScopedLibraryChildChild::Create(
int value,
int other_value,
int other_other_value) {
CefTranslatorTestScopedLibraryChildChild::Create(int value,
int other_value,
int other_other_value) {
return CefOwnPtr<CefTranslatorTestScopedLibraryChildChild>(
new CefTranslatorTestScopedLibraryChildChildImpl(value, other_value,
other_other_value));
}
class CefTranslatorTestImpl : public CefTranslatorTest {
public:
CefTranslatorTestImpl() {
}
CefTranslatorTestImpl() {}
// PRIMITIVE VALUES
void GetVoid() override {
}
void GetVoid() override {}
bool GetBool() override {
return TEST_BOOL_VAL;
}
bool GetBool() override { return TEST_BOOL_VAL; }
int GetInt() override {
return TEST_INT_VAL;
}
int GetInt() override { return TEST_INT_VAL; }
double GetDouble() override {
return TEST_DOUBLE_VAL;
}
double GetDouble() override { return TEST_DOUBLE_VAL; }
long GetLong() override {
return TEST_LONG_VAL;
}
long GetLong() override { return TEST_LONG_VAL; }
size_t GetSizet() override {
return TEST_SIZET_VAL;
}
size_t GetSizet() override { return TEST_SIZET_VAL; }
bool SetVoid() override {
return true;
}
bool SetVoid() override { return true; }
bool SetBool(bool val) override {
return (val == TEST_BOOL_VAL);
}
bool SetBool(bool val) override { return (val == TEST_BOOL_VAL); }
bool SetInt(int val) override {
return (val == TEST_INT_VAL);
}
bool SetInt(int val) override { return (val == TEST_INT_VAL); }
bool SetDouble(double val) override {
return (val == TEST_DOUBLE_VAL);
}
bool SetDouble(double val) override { return (val == TEST_DOUBLE_VAL); }
bool SetLong(long val) override {
return (val == TEST_LONG_VAL);
}
bool SetSizet(size_t val) override {
return (val == TEST_SIZET_VAL);
}
bool SetLong(long val) override { return (val == TEST_LONG_VAL); }
bool SetSizet(size_t val) override { return (val == TEST_SIZET_VAL); }
// PRIMITIVE LIST VALUES
@ -328,33 +237,24 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return true;
}
size_t GetIntListSize() override {
return 2U;
}
size_t GetIntListSize() override { return 2U; }
// STRING VALUES
CefString GetString() override {
return TEST_STRING_VAL;
}
CefString GetString() override { return TEST_STRING_VAL; }
bool SetString(const CefString& val) override {
return (val.ToString() == TEST_STRING_VAL);
}
void GetStringByRef(CefString& val) override {
val = TEST_STRING_VAL;
}
void GetStringByRef(CefString& val) override { val = TEST_STRING_VAL; }
// STRING LIST VALUES
bool SetStringList(const std::vector<CefString>& val) override {
if (val.size() != 3U)
return false;
return val[0] == TEST_STRING_VAL &&
val[1] == TEST_STRING_VAL2 &&
return val[0] == TEST_STRING_VAL && val[1] == TEST_STRING_VAL2 &&
val[2] == TEST_STRING_VAL3;
}
@ -367,7 +267,6 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return true;
}
// STRING MAP VALUES
bool SetStringMap(const StringMap& val) override {
@ -375,7 +274,7 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return false;
StringMap::const_iterator it;
it = val.find(TEST_STRING_KEY);
if (it == val.end() || it->second != TEST_STRING_VAL)
return false;
@ -398,7 +297,6 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return true;
}
// STRING MULTIMAP VALUES
bool SetStringMultimap(
@ -407,7 +305,7 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return false;
StringMultimap::const_iterator it;
it = val.find(TEST_STRING_KEY);
if (it == val.end() || it->second != TEST_STRING_VAL)
return false;
@ -430,12 +328,9 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return true;
}
// STRUCT VALUES
CefPoint GetPoint() override {
return CefPoint(TEST_X_VAL, TEST_Y_VAL);
}
CefPoint GetPoint() override { return CefPoint(TEST_X_VAL, TEST_Y_VAL); }
bool SetPoint(const CefPoint& val) override {
return val.x == TEST_X_VAL && val.y == TEST_Y_VAL;
@ -445,7 +340,6 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
val = CefPoint(TEST_X_VAL, TEST_Y_VAL);
}
// STRUCT LIST VALUES
bool SetPointList(const std::vector<CefPoint>& val) override {
@ -464,10 +358,7 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return true;
}
size_t GetPointListSize() override {
return 2U;
}
size_t GetPointListSize() override { return 2U; }
// LIBRARY-SIDE REFPTR VALUES
@ -495,18 +386,19 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return val;
}
// LIBRARY-SIDE REFPTR LIST VALUES
bool SetRefPtrLibraryList(
const std::vector<CefRefPtr<CefTranslatorTestRefPtrLibrary> >& val,
int val1, int val2) override {
const std::vector<CefRefPtr<CefTranslatorTestRefPtrLibrary>>& val,
int val1,
int val2) override {
if (val.size() != 2U)
return false;
return val[0]->GetValue() == val1 && val[1]->GetValue() == val2;
}
bool GetRefPtrLibraryListByRef(RefPtrLibraryList& val, int val1,
bool GetRefPtrLibraryListByRef(RefPtrLibraryList& val,
int val1,
int val2) override {
if (val.size() != GetRefPtrLibraryListSize())
return false;
@ -516,10 +408,7 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return true;
}
size_t GetRefPtrLibraryListSize() override {
return 2U;
}
size_t GetRefPtrLibraryListSize() override { return 2U; }
// CLIENT-SIDE REFPTR VALUES
@ -542,12 +431,12 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return val;
}
// CLIENT-SIDE REFPTR LIST VALUES
bool SetRefPtrClientList(
const std::vector<CefRefPtr<CefTranslatorTestRefPtrClient> >& val,
int val1, int val2) override {
const std::vector<CefRefPtr<CefTranslatorTestRefPtrClient>>& val,
int val1,
int val2) override {
if (val.size() != 2U)
return false;
return val[0]->GetValue() == val1 && val[1]->GetValue() == val2;
@ -565,10 +454,7 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return true;
}
size_t GetRefPtrClientListSize() override {
return 2U;
}
size_t GetRefPtrClientListSize() override { return 2U; }
// LIBRARY-SIDE OWNPTR VALUES
@ -597,7 +483,6 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return CefOwnPtr<CefTranslatorTestScopedLibrary>(val.release());
}
// CLIENT-SIDE OWNPTR VALUES
int SetOwnPtrClient(CefOwnPtr<CefTranslatorTestScopedClient> val) override {
@ -619,7 +504,6 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return CefOwnPtr<CefTranslatorTestScopedClient>(val.release());
}
// LIBRARY-SIDE RAWPTR VALUES
int SetRawPtrLibrary(CefRawPtr<CefTranslatorTestScopedLibrary> val) override {
@ -631,18 +515,17 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return val->GetValue();
}
// LIBRARY-SIDE RAWPTR LIST VALUES
bool SetRawPtrLibraryList(
const std::vector<CefRawPtr<CefTranslatorTestScopedLibrary> >& val,
int val1, int val2) override {
const std::vector<CefRawPtr<CefTranslatorTestScopedLibrary>>& val,
int val1,
int val2) override {
if (val.size() != 2U)
return false;
return val[0]->GetValue() == val1 && val[1]->GetValue() == val2;
}
// CLIENT-SIDE RAWPTR VALUES
int SetRawPtrClient(CefRawPtr<CefTranslatorTestScopedClient> val) override {
@ -654,12 +537,12 @@ class CefTranslatorTestImpl : public CefTranslatorTest {
return val->GetValue();
}
// CLIENT-SIDE RAWPTR LIST VALUES
bool SetRawPtrClientList(
const std::vector<CefRawPtr<CefTranslatorTestScopedClient> >& val,
int val1, int val2) override {
const std::vector<CefRawPtr<CefTranslatorTestScopedClient>>& val,
int val1,
int val2) override {
if (val.size() != 2U)
return false;
return val[0]->GetValue() == val1 && val[1]->GetValue() == val2;