Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5006398

Browse files
authored
Re-land "Make fml/... compatible with .clang_tidy (#48030)
Reverts #48004
1 parent b29c564 commit 5006398

10 files changed

+31
-16
lines changed

.ci.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,24 @@ targets:
161161
config_name: linux_benchmarks
162162
timeout: 60
163163

164+
- name: Linux Fuchsia
165+
bringup: true
166+
recipe: engine/engine
167+
properties:
168+
build_fuchsia: "true"
169+
fuchsia_ctl_version: version:0.0.27
170+
# ensure files from pre-production Fuchsia SDK tests are purged from cache
171+
clobber: "true"
172+
timeout: 90
173+
runIfNot:
174+
- lib/web_ui/**
175+
- shell/platform/android/**
176+
- shell/platform/darwin/**
177+
- shell/platform/glfw/**
178+
- shell/platform/linux/**
179+
- shell/platform/windows/**
180+
- web_sdk/**
181+
164182
- name: Linux Fuchsia FEMU
165183
recipe: engine/femu_test
166184
properties:

fml/memory/ref_counted_internal.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ inline RefCountedThreadSafeBase::RefCountedThreadSafeBase()
8787
: ref_count_(1u)
8888
#ifndef NDEBUG
8989
,
90-
adoption_required_(true),
91-
destruction_started_(false)
90+
adoption_required_(true)
9291
#endif
9392
{
9493
}

fml/memory/weak_ptr_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class WeakPtrFlag : public fml::RefCountedThreadSafe<WeakPtrFlag> {
3030
void Invalidate();
3131

3232
private:
33-
bool is_valid_;
33+
bool is_valid_ = false;
3434

3535
FML_DISALLOW_COPY_AND_ASSIGN(WeakPtrFlag);
3636
};

fml/message_loop_task_queues.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ TaskQueueId MessageLoopTaskQueues::CreateTaskQueue() {
5555
return loop_id;
5656
}
5757

58-
MessageLoopTaskQueues::MessageLoopTaskQueues()
59-
: task_queue_id_counter_(0), order_(0) {
58+
MessageLoopTaskQueues::MessageLoopTaskQueues() : order_(0) {
6059
tls_task_source_grade.reset(
6160
new TaskSourceGradeHolder{TaskSourceGrade::kUnspecified});
6261
}

fml/message_loop_task_queues.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class MessageLoopTaskQueues {
155155
mutable std::mutex queue_mutex_;
156156
std::map<TaskQueueId, std::unique_ptr<TaskQueueEntry>> queue_entries_;
157157

158-
size_t task_queue_id_counter_;
158+
size_t task_queue_id_counter_ = 0;
159159

160160
std::atomic_int order_;
161161

fml/platform/android/message_loop_android.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ static ALooper* AcquireLooperForThread() {
3030

3131
MessageLoopAndroid::MessageLoopAndroid()
3232
: looper_(AcquireLooperForThread()),
33-
timer_fd_(::timerfd_create(kClockType, TFD_NONBLOCK | TFD_CLOEXEC)),
34-
running_(false) {
33+
timer_fd_(::timerfd_create(kClockType, TFD_NONBLOCK | TFD_CLOEXEC)) {
3534
FML_CHECK(looper_.is_valid());
3635
FML_CHECK(timer_fd_.is_valid());
3736

fml/platform/android/message_loop_android.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class MessageLoopAndroid : public MessageLoopImpl {
2929
private:
3030
fml::UniqueObject<ALooper*, UniqueLooperTraits> looper_;
3131
fml::UniqueFD timer_fd_;
32-
bool running_;
32+
bool running_ = false;
3333

3434
MessageLoopAndroid();
3535

fml/shared_thread_merger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class SharedThreadMerger
5959
fml::TaskQueueId subsumed_;
6060
fml::MessageLoopTaskQueues* task_queues_;
6161
std::mutex mutex_;
62-
bool enabled_;
62+
bool enabled_ = false;
6363

6464
/// The |MergeWithLease| or |ExtendLeaseTo| method will record the caller
6565
/// into this lease_term_by_caller_ map, |UnMergeNowIfLastOne|

fml/synchronization/semaphore.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,24 +170,24 @@ class PlatformSemaphore {
170170

171171
namespace fml {
172172

173-
Semaphore::Semaphore(uint32_t count) : _impl(new PlatformSemaphore(count)) {}
173+
Semaphore::Semaphore(uint32_t count) : impl_(new PlatformSemaphore(count)) {}
174174

175175
Semaphore::~Semaphore() = default;
176176

177177
bool Semaphore::IsValid() const {
178-
return _impl->IsValid();
178+
return impl_->IsValid();
179179
}
180180

181181
bool Semaphore::Wait() {
182-
return _impl->Wait();
182+
return impl_->Wait();
183183
}
184184

185185
bool Semaphore::TryWait() {
186-
return _impl->TryWait();
186+
return impl_->TryWait();
187187
}
188188

189189
void Semaphore::Signal() {
190-
return _impl->Signal();
190+
return impl_->Signal();
191191
}
192192

193193
} // namespace fml

fml/synchronization/semaphore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class Semaphore {
7878
void Signal();
7979

8080
private:
81-
std::unique_ptr<PlatformSemaphore> _impl;
81+
std::unique_ptr<PlatformSemaphore> impl_;
8282

8383
FML_DISALLOW_COPY_AND_ASSIGN(Semaphore);
8484
};

0 commit comments

Comments
 (0)