From 3b53899b681f76c4bdf13c85e98e8c7e46f95f81 Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" Date: Tue, 14 Nov 2023 00:16:31 +0000 Subject: [PATCH] Revert "Make `fml/...` compatible with `.clang_tidy`. (#47992)" This reverts commit 3cd830c93dad30ffc1382c486e972442830b87ce. --- fml/memory/ref_counted_internal.h | 3 ++- fml/memory/weak_ptr_internal.h | 2 +- fml/message_loop_task_queues.h | 2 +- fml/platform/android/message_loop_android.h | 2 +- fml/shared_thread_merger.h | 2 +- fml/synchronization/semaphore.cc | 10 +++++----- fml/synchronization/semaphore.h | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/fml/memory/ref_counted_internal.h b/fml/memory/ref_counted_internal.h index 95f9e6fe75d63..47bda01005ef9 100644 --- a/fml/memory/ref_counted_internal.h +++ b/fml/memory/ref_counted_internal.h @@ -87,7 +87,8 @@ inline RefCountedThreadSafeBase::RefCountedThreadSafeBase() : ref_count_(1u) #ifndef NDEBUG , - adoption_required_(true) + adoption_required_(true), + destruction_started_(false) #endif { } diff --git a/fml/memory/weak_ptr_internal.h b/fml/memory/weak_ptr_internal.h index d94ce7c6fa588..28d1fca6d4f57 100644 --- a/fml/memory/weak_ptr_internal.h +++ b/fml/memory/weak_ptr_internal.h @@ -30,7 +30,7 @@ class WeakPtrFlag : public fml::RefCountedThreadSafe { void Invalidate(); private: - bool is_valid_ = false; + bool is_valid_; FML_DISALLOW_COPY_AND_ASSIGN(WeakPtrFlag); }; diff --git a/fml/message_loop_task_queues.h b/fml/message_loop_task_queues.h index b3c9a63314af6..ba464493952c0 100644 --- a/fml/message_loop_task_queues.h +++ b/fml/message_loop_task_queues.h @@ -155,7 +155,7 @@ class MessageLoopTaskQueues { mutable std::mutex queue_mutex_; std::map> queue_entries_; - size_t task_queue_id_counter_ = 0; + size_t task_queue_id_counter_; std::atomic_int order_; diff --git a/fml/platform/android/message_loop_android.h b/fml/platform/android/message_loop_android.h index a1bdad38a3840..6ff26be0fd373 100644 --- a/fml/platform/android/message_loop_android.h +++ b/fml/platform/android/message_loop_android.h @@ -29,7 +29,7 @@ class MessageLoopAndroid : public MessageLoopImpl { private: fml::UniqueObject looper_; fml::UniqueFD timer_fd_; - bool running_ = false; + bool running_; MessageLoopAndroid(); diff --git a/fml/shared_thread_merger.h b/fml/shared_thread_merger.h index ed361edb7f062..3f8ae9a6367f8 100644 --- a/fml/shared_thread_merger.h +++ b/fml/shared_thread_merger.h @@ -59,7 +59,7 @@ class SharedThreadMerger fml::TaskQueueId subsumed_; fml::MessageLoopTaskQueues* task_queues_; std::mutex mutex_; - bool enabled_ = false; + bool enabled_; /// The |MergeWithLease| or |ExtendLeaseTo| method will record the caller /// into this lease_term_by_caller_ map, |UnMergeNowIfLastOne| diff --git a/fml/synchronization/semaphore.cc b/fml/synchronization/semaphore.cc index 9746c19f21f97..8ffaab76cac29 100644 --- a/fml/synchronization/semaphore.cc +++ b/fml/synchronization/semaphore.cc @@ -170,24 +170,24 @@ class PlatformSemaphore { namespace fml { -Semaphore::Semaphore(uint32_t count) : impl_(new PlatformSemaphore(count)) {} +Semaphore::Semaphore(uint32_t count) : _impl(new PlatformSemaphore(count)) {} Semaphore::~Semaphore() = default; bool Semaphore::IsValid() const { - return impl_->IsValid(); + return _impl->IsValid(); } bool Semaphore::Wait() { - return impl_->Wait(); + return _impl->Wait(); } bool Semaphore::TryWait() { - return impl_->TryWait(); + return _impl->TryWait(); } void Semaphore::Signal() { - return impl_->Signal(); + return _impl->Signal(); } } // namespace fml diff --git a/fml/synchronization/semaphore.h b/fml/synchronization/semaphore.h index 1207f59a6f3d2..38d1488d64870 100644 --- a/fml/synchronization/semaphore.h +++ b/fml/synchronization/semaphore.h @@ -78,7 +78,7 @@ class Semaphore { void Signal(); private: - std::unique_ptr impl_; + std::unique_ptr _impl; FML_DISALLOW_COPY_AND_ASSIGN(Semaphore); };