Reformat the WebRTC code base
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
diff --git a/rtc_base/thread_checker.h b/rtc_base/thread_checker.h
index cc03b8d..ad04508 100644
--- a/rtc_base/thread_checker.h
+++ b/rtc_base/thread_checker.h
@@ -32,9 +32,7 @@
// right version for your build configuration.
class ThreadCheckerDoNothing {
public:
- bool CalledOnValidThread() const {
- return true;
- }
+ bool CalledOnValidThread() const { return true; }
void DetachFromThread() {}
};
@@ -86,7 +84,7 @@
RTC_EXCLUSIVE_LOCK_FUNCTION(thread_like_object) {}
~AnnounceOnThread() RTC_UNLOCK_FUNCTION() {}
- template<typename ThreadLikeObject>
+ template <typename ThreadLikeObject>
static bool IsCurrent(const ThreadLikeObject* thread_like_object) {
return thread_like_object->IsCurrent();
}
@@ -163,9 +161,10 @@
// }
// Document if a function expected to be called from same thread/task queue.
-#define RTC_RUN_ON(x) RTC_THREAD_ANNOTATION_ATTRIBUTE__(exclusive_locks_required(x))
+#define RTC_RUN_ON(x) \
+ RTC_THREAD_ANNOTATION_ATTRIBUTE__(exclusive_locks_required(x))
-#define RTC_DCHECK_RUN_ON(thread_like_object) \
+#define RTC_DCHECK_RUN_ON(thread_like_object) \
rtc::internal::AnnounceOnThread thread_announcer(thread_like_object); \
RTC_DCHECK(rtc::internal::AnnounceOnThread::IsCurrent(thread_like_object))