Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c57378e authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by Chih-hung Hsieh
Browse files

Fix/suppress hwui/tests google-explicit-constructor warnings

* Add explicit to conversion constructors/operators

Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: I59c61af29ab09209c5a4c2bf43b10215bf59756a
parent bd737985
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ static bool _BitmapFillrate(

class BitmapFillrate : public TestScene {
public:
    BitmapFillrate(BitmapAllocationTestUtils::BitmapAllocator allocator)
    explicit BitmapFillrate(BitmapAllocationTestUtils::BitmapAllocator allocator)
            : TestScene(), mAllocator(allocator) {}

    void createContent(int width, int height, Canvas& canvas) override {
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ static bool _BitmapShaders(BitmapAllocationTestUtils::registerBitmapAllocationSc

class BitmapShaders : public TestScene {
public:
    BitmapShaders(BitmapAllocationTestUtils::BitmapAllocator allocator)
    explicit BitmapShaders(BitmapAllocationTestUtils::BitmapAllocator allocator)
            : TestScene(), mAllocator(allocator) {}

    sp<RenderNode> card;
+4 −4
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ static bool _TvAppNoRoundedCornerColorFilter(

class TvApp : public TestScene {
public:
    TvApp(BitmapAllocationTestUtils::BitmapAllocator allocator)
    explicit TvApp(BitmapAllocationTestUtils::BitmapAllocator allocator)
            : TestScene(), mAllocator(allocator) {}

    sp<RenderNode> mBg;
@@ -232,7 +232,7 @@ private:

class TvAppNoRoundedCorner : public TvApp {
public:
    TvAppNoRoundedCorner(BitmapAllocationTestUtils::BitmapAllocator allocator) : TvApp(allocator) {}
    explicit TvAppNoRoundedCorner(BitmapAllocationTestUtils::BitmapAllocator allocator) : TvApp(allocator) {}

private:
    virtual float roundedCornerRadius() override { return dp(0); }
@@ -240,7 +240,7 @@ private:

class TvAppColorFilter : public TvApp {
public:
    TvAppColorFilter(BitmapAllocationTestUtils::BitmapAllocator allocator) : TvApp(allocator) {}
    explicit TvAppColorFilter(BitmapAllocationTestUtils::BitmapAllocator allocator) : TvApp(allocator) {}

private:
    virtual bool useOverlay() override { return false; }
@@ -248,7 +248,7 @@ private:

class TvAppNoRoundedCornerColorFilter : public TvApp {
public:
    TvAppNoRoundedCornerColorFilter(BitmapAllocationTestUtils::BitmapAllocator allocator)
    explicit TvAppNoRoundedCornerColorFilter(BitmapAllocationTestUtils::BitmapAllocator allocator)
            : TvApp(allocator) {}

private:
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ static void testProperty(std::function<void(RenderProperties&)> propSetupCallbac
    static const int CANVAS_HEIGHT = 100;
    class PropertyTestCanvas : public TestCanvasBase {
    public:
        PropertyTestCanvas(std::function<void(const SkCanvas&)> callback)
        explicit PropertyTestCanvas(std::function<void(const SkCanvas&)> callback)
                : TestCanvasBase(CANVAS_WIDTH, CANVAS_HEIGHT), mCallback(callback) {}
        void onDrawRect(const SkRect& rect, const SkPaint& paint) override {
            EXPECT_EQ(mDrawCounter++, 0);
+2 −2
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ TEST(ThreadBase, lifecyclePerf) {
    };

    struct Counter {
        Counter(EventCount* count) : mCount(count) { mCount->construct++; }
        explicit Counter(EventCount* count) : mCount(count) { mCount->construct++; }

        Counter(const Counter& other) : mCount(other.mCount) {
            if (mCount) mCount->copy++;