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

Commit e416221

Browse files
committed
Make impeller/aiks/... compatible with .clang-tidy.
1 parent 985e5ec commit e416221

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

impeller/aiks/canvas_recorder.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace impeller {
1616
/// golden tests can be written at a higher level, migrate these to
1717
/// flutter::DisplayListOpType.
1818
enum CanvasRecorderOp : uint16_t {
19+
// NOLINTBEGIN(readability-identifier-naming)
1920
New,
2021
Save,
2122
SaveLayer,
@@ -45,6 +46,7 @@ enum CanvasRecorderOp : uint16_t {
4546
DrawTextFrame,
4647
DrawVertices,
4748
DrawAtlas,
49+
// NOLINTEND(readability-identifier-naming)
4850
};
4951

5052
// Canvas recorder should only be used when IMPELLER_TRACE_CANVAS is defined

impeller/aiks/image.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace impeller {
1313

1414
class Image {
1515
public:
16-
Image(std::shared_ptr<Texture> texture);
16+
explicit Image(std::shared_ptr<Texture> texture);
1717

1818
~Image();
1919

impeller/aiks/testing/context_mock.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#pragma once
66

77
#include <string>
8+
#include <utility>
89
#include <vector>
910

1011
#include "gmock/gmock-function-mocker.h"
@@ -18,8 +19,8 @@ namespace testing {
1819

1920
class CommandBufferMock : public CommandBuffer {
2021
public:
21-
CommandBufferMock(std::weak_ptr<const Context> context)
22-
: CommandBuffer(context) {}
22+
explicit CommandBufferMock(std::weak_ptr<const Context> context)
23+
: CommandBuffer(std::move(context)) {}
2324

2425
MOCK_METHOD(bool, IsValid, (), (const, override));
2526

@@ -32,7 +33,7 @@ class CommandBufferMock : public CommandBuffer {
3233

3334
static std::shared_ptr<RenderPass> ForwardOnCreateRenderPass(
3435
CommandBuffer* command_buffer,
35-
RenderTarget render_target) {
36+
const RenderTarget& render_target) {
3637
return command_buffer->OnCreateRenderPass(render_target);
3738
}
3839

@@ -48,7 +49,7 @@ class CommandBufferMock : public CommandBuffer {
4849
(override));
4950
static bool ForwardOnSubmitCommands(CommandBuffer* command_buffer,
5051
CompletionCallback callback) {
51-
return command_buffer->OnSubmitCommands(callback);
52+
return command_buffer->OnSubmitCommands(std::move(callback));
5253
}
5354

5455
MOCK_METHOD(void, OnWaitUntilScheduled, (), (override));

0 commit comments

Comments
 (0)