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

Commit 3179986

Browse files
authored
Make {flow|fml|impeller}/... compatible with .clang_tidy. (#48241)
Another few stragglers.
1 parent 0c2de1e commit 3179986

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

flow/testing/mock_layer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ class MockLayer : public Layer {
2727
public:
2828
explicit MockLayer(const SkPath& path, DlPaint paint = DlPaint());
2929

30-
static std::shared_ptr<MockLayer> Make(SkPath path,
30+
static std::shared_ptr<MockLayer> Make(const SkPath& path,
3131
DlPaint paint = DlPaint()) {
32-
return std::make_shared<MockLayer>(std::move(path), std::move(paint));
32+
return std::make_shared<MockLayer>(path, std::move(paint));
3333
}
3434

35-
static std::shared_ptr<MockLayer> MakeOpacityCompatible(SkPath path) {
36-
auto mock_layer = std::make_shared<MockLayer>(std::move(path), DlPaint());
35+
static std::shared_ptr<MockLayer> MakeOpacityCompatible(const SkPath& path) {
36+
auto mock_layer = std::make_shared<MockLayer>(path, DlPaint());
3737
mock_layer->set_fake_opacity_compatible(true);
3838
return mock_layer;
3939
}

fml/platform/linux/message_loop_linux.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ static constexpr int kClockType = CLOCK_MONOTONIC;
1616

1717
MessageLoopLinux::MessageLoopLinux()
1818
: epoll_fd_(FML_HANDLE_EINTR(::epoll_create(1 /* unused */))),
19-
timer_fd_(::timerfd_create(kClockType, TFD_NONBLOCK | TFD_CLOEXEC)),
20-
running_(false) {
19+
timer_fd_(::timerfd_create(kClockType, TFD_NONBLOCK | TFD_CLOEXEC)) {
2120
FML_CHECK(epoll_fd_.is_valid());
2221
FML_CHECK(timer_fd_.is_valid());
2322
bool added_source = AddOrRemoveTimerSource(true);

fml/platform/linux/message_loop_linux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class MessageLoopLinux : public MessageLoopImpl {
1717
private:
1818
fml::UniqueFD epoll_fd_;
1919
fml::UniqueFD timer_fd_;
20-
bool running_;
20+
bool running_ = false;
2121

2222
MessageLoopLinux();
2323

impeller/renderer/backend/gles/handle_gles.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ inline std::ostream& operator<<(std::ostream& out,
7878
if (handle.IsDead()) {
7979
out << "DEAD";
8080
} else {
81-
out << handle.name.value().id;
81+
if (handle.name.has_value()) {
82+
out << handle.name.value().id;
83+
} else {
84+
out << "UNNAMED";
85+
}
8286
}
8387
out << ")";
8488
return out;

impeller/renderer/backend/gles/sampler_gles.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class SamplerGLES final : public Sampler,
2525
private:
2626
friend class SamplerLibraryGLES;
2727

28-
SamplerGLES(SamplerDescriptor desc);
28+
explicit SamplerGLES(SamplerDescriptor desc);
2929

3030
// |Sampler|
3131
bool IsValid() const override;

0 commit comments

Comments
 (0)