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

@ -46,12 +46,11 @@
#include "include/base/cef_macros.h"
#include "include/cef_task.h"
#define CEF_REQUIRE_UI_THREAD() DCHECK(CefCurrentlyOn(TID_UI));
#define CEF_REQUIRE_IO_THREAD() DCHECK(CefCurrentlyOn(TID_IO));
#define CEF_REQUIRE_FILE_THREAD() DCHECK(CefCurrentlyOn(TID_FILE));
#define CEF_REQUIRE_UI_THREAD() DCHECK(CefCurrentlyOn(TID_UI));
#define CEF_REQUIRE_IO_THREAD() DCHECK(CefCurrentlyOn(TID_IO));
#define CEF_REQUIRE_FILE_THREAD() DCHECK(CefCurrentlyOn(TID_FILE));
#define CEF_REQUIRE_RENDERER_THREAD() DCHECK(CefCurrentlyOn(TID_RENDERER));
// Use this struct in conjuction with refcounted types to ensure that an
// object is deleted on the specified thread. For example:
//
@ -72,9 +71,9 @@
// foo->DoSomething();
// foo = NULL; // Deletion of |foo| will occur on the UI thread.
//
template<CefThreadId thread>
template <CefThreadId thread>
struct CefDeleteOnThread {
template<typename T>
template <typename T>
static void Destruct(const T* x) {
if (CefCurrentlyOn(thread)) {
delete x;
@ -85,11 +84,10 @@ struct CefDeleteOnThread {
}
};
struct CefDeleteOnUIThread : public CefDeleteOnThread<TID_UI> { };
struct CefDeleteOnIOThread : public CefDeleteOnThread<TID_IO> { };
struct CefDeleteOnFileThread : public CefDeleteOnThread<TID_FILE> { };
struct CefDeleteOnRendererThread : public CefDeleteOnThread<TID_RENDERER> { };
struct CefDeleteOnUIThread : public CefDeleteOnThread<TID_UI> {};
struct CefDeleteOnIOThread : public CefDeleteOnThread<TID_IO> {};
struct CefDeleteOnFileThread : public CefDeleteOnThread<TID_FILE> {};
struct CefDeleteOnRendererThread : public CefDeleteOnThread<TID_RENDERER> {};
///
// Helper class to manage a scoped copy of |argv|.
@ -105,9 +103,7 @@ class CefScopedArgArray {
}
array_[argc] = NULL;
}
~CefScopedArgArray() {
delete [] array_;
}
~CefScopedArgArray() { delete[] array_; }
char** array() const { return array_; }
@ -117,7 +113,7 @@ class CefScopedArgArray {
// Keep values in a vector separate from |array_| because various users may
// modify |array_| and we still want to clean up memory properly.
std::vector<std::string> values_;
DISALLOW_COPY_AND_ASSIGN(CefScopedArgArray);
};