Make {flow|fml|impeller}/... compatible with .clang_tidy. (flutter/engine#48241)
Another few stragglers.
This commit is contained in:
@@ -27,13 +27,13 @@ class MockLayer : public Layer {
|
||||
public:
|
||||
explicit MockLayer(const SkPath& path, DlPaint paint = DlPaint());
|
||||
|
||||
static std::shared_ptr<MockLayer> Make(SkPath path,
|
||||
static std::shared_ptr<MockLayer> Make(const SkPath& path,
|
||||
DlPaint paint = DlPaint()) {
|
||||
return std::make_shared<MockLayer>(std::move(path), std::move(paint));
|
||||
return std::make_shared<MockLayer>(path, std::move(paint));
|
||||
}
|
||||
|
||||
static std::shared_ptr<MockLayer> MakeOpacityCompatible(SkPath path) {
|
||||
auto mock_layer = std::make_shared<MockLayer>(std::move(path), DlPaint());
|
||||
static std::shared_ptr<MockLayer> MakeOpacityCompatible(const SkPath& path) {
|
||||
auto mock_layer = std::make_shared<MockLayer>(path, DlPaint());
|
||||
mock_layer->set_fake_opacity_compatible(true);
|
||||
return mock_layer;
|
||||
}
|
||||
|
||||
@@ -16,8 +16,7 @@ static constexpr int kClockType = CLOCK_MONOTONIC;
|
||||
|
||||
MessageLoopLinux::MessageLoopLinux()
|
||||
: epoll_fd_(FML_HANDLE_EINTR(::epoll_create(1 /* unused */))),
|
||||
timer_fd_(::timerfd_create(kClockType, TFD_NONBLOCK | TFD_CLOEXEC)),
|
||||
running_(false) {
|
||||
timer_fd_(::timerfd_create(kClockType, TFD_NONBLOCK | TFD_CLOEXEC)) {
|
||||
FML_CHECK(epoll_fd_.is_valid());
|
||||
FML_CHECK(timer_fd_.is_valid());
|
||||
bool added_source = AddOrRemoveTimerSource(true);
|
||||
|
||||
@@ -17,7 +17,7 @@ class MessageLoopLinux : public MessageLoopImpl {
|
||||
private:
|
||||
fml::UniqueFD epoll_fd_;
|
||||
fml::UniqueFD timer_fd_;
|
||||
bool running_;
|
||||
bool running_ = false;
|
||||
|
||||
MessageLoopLinux();
|
||||
|
||||
|
||||
@@ -78,7 +78,11 @@ inline std::ostream& operator<<(std::ostream& out,
|
||||
if (handle.IsDead()) {
|
||||
out << "DEAD";
|
||||
} else {
|
||||
out << handle.name.value().id;
|
||||
if (handle.name.has_value()) {
|
||||
out << handle.name.value().id;
|
||||
} else {
|
||||
out << "UNNAMED";
|
||||
}
|
||||
}
|
||||
out << ")";
|
||||
return out;
|
||||
|
||||
@@ -25,7 +25,7 @@ class SamplerGLES final : public Sampler,
|
||||
private:
|
||||
friend class SamplerLibraryGLES;
|
||||
|
||||
SamplerGLES(SamplerDescriptor desc);
|
||||
explicit SamplerGLES(SamplerDescriptor desc);
|
||||
|
||||
// |Sampler|
|
||||
bool IsValid() const override;
|
||||
|
||||
Reference in New Issue
Block a user