Make fml/... compatible with .clang_tidy. (flutter/engine#47992)
Work towards https://github.com/flutter/flutter/issues/134969. All changes were made automatically (i.e. with `--fix`).
This commit is contained in:
@@ -87,8 +87,7 @@ inline RefCountedThreadSafeBase::RefCountedThreadSafeBase()
|
|||||||
: ref_count_(1u)
|
: ref_count_(1u)
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
,
|
,
|
||||||
adoption_required_(true),
|
adoption_required_(true)
|
||||||
destruction_started_(false)
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class WeakPtrFlag : public fml::RefCountedThreadSafe<WeakPtrFlag> {
|
|||||||
void Invalidate();
|
void Invalidate();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool is_valid_;
|
bool is_valid_ = false;
|
||||||
|
|
||||||
FML_DISALLOW_COPY_AND_ASSIGN(WeakPtrFlag);
|
FML_DISALLOW_COPY_AND_ASSIGN(WeakPtrFlag);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ class MessageLoopTaskQueues {
|
|||||||
mutable std::mutex queue_mutex_;
|
mutable std::mutex queue_mutex_;
|
||||||
std::map<TaskQueueId, std::unique_ptr<TaskQueueEntry>> queue_entries_;
|
std::map<TaskQueueId, std::unique_ptr<TaskQueueEntry>> queue_entries_;
|
||||||
|
|
||||||
size_t task_queue_id_counter_;
|
size_t task_queue_id_counter_ = 0;
|
||||||
|
|
||||||
std::atomic_int order_;
|
std::atomic_int order_;
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class MessageLoopAndroid : public MessageLoopImpl {
|
|||||||
private:
|
private:
|
||||||
fml::UniqueObject<ALooper*, UniqueLooperTraits> looper_;
|
fml::UniqueObject<ALooper*, UniqueLooperTraits> looper_;
|
||||||
fml::UniqueFD timer_fd_;
|
fml::UniqueFD timer_fd_;
|
||||||
bool running_;
|
bool running_ = false;
|
||||||
|
|
||||||
MessageLoopAndroid();
|
MessageLoopAndroid();
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class SharedThreadMerger
|
|||||||
fml::TaskQueueId subsumed_;
|
fml::TaskQueueId subsumed_;
|
||||||
fml::MessageLoopTaskQueues* task_queues_;
|
fml::MessageLoopTaskQueues* task_queues_;
|
||||||
std::mutex mutex_;
|
std::mutex mutex_;
|
||||||
bool enabled_;
|
bool enabled_ = false;
|
||||||
|
|
||||||
/// The |MergeWithLease| or |ExtendLeaseTo| method will record the caller
|
/// The |MergeWithLease| or |ExtendLeaseTo| method will record the caller
|
||||||
/// into this lease_term_by_caller_ map, |UnMergeNowIfLastOne|
|
/// into this lease_term_by_caller_ map, |UnMergeNowIfLastOne|
|
||||||
|
|||||||
@@ -170,24 +170,24 @@ class PlatformSemaphore {
|
|||||||
|
|
||||||
namespace fml {
|
namespace fml {
|
||||||
|
|
||||||
Semaphore::Semaphore(uint32_t count) : _impl(new PlatformSemaphore(count)) {}
|
Semaphore::Semaphore(uint32_t count) : impl_(new PlatformSemaphore(count)) {}
|
||||||
|
|
||||||
Semaphore::~Semaphore() = default;
|
Semaphore::~Semaphore() = default;
|
||||||
|
|
||||||
bool Semaphore::IsValid() const {
|
bool Semaphore::IsValid() const {
|
||||||
return _impl->IsValid();
|
return impl_->IsValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Semaphore::Wait() {
|
bool Semaphore::Wait() {
|
||||||
return _impl->Wait();
|
return impl_->Wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Semaphore::TryWait() {
|
bool Semaphore::TryWait() {
|
||||||
return _impl->TryWait();
|
return impl_->TryWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Semaphore::Signal() {
|
void Semaphore::Signal() {
|
||||||
return _impl->Signal();
|
return impl_->Signal();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace fml
|
} // namespace fml
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class Semaphore {
|
|||||||
void Signal();
|
void Signal();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<PlatformSemaphore> _impl;
|
std::unique_ptr<PlatformSemaphore> impl_;
|
||||||
|
|
||||||
FML_DISALLOW_COPY_AND_ASSIGN(Semaphore);
|
FML_DISALLOW_COPY_AND_ASSIGN(Semaphore);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user