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}
This commit is contained in:
@ -32,9 +32,7 @@ namespace rtc {
|
||||
// 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 @@ class RTC_SCOPED_LOCKABLE AnnounceOnThread {
|
||||
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 @@ class RTC_SCOPED_LOCKABLE AnnounceOnThread {
|
||||
// }
|
||||
|
||||
// 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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user