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

Commit 382ecd3d authored by Colin Cross's avatar Colin Cross
Browse files

Fix constructor parameters shadowing member variables

Using the same name for the constructor parameter and the member
variable causes a warning that was being hidden by the use of -isystem
to include frameworks/native/include.  Prefix the parameter with an
underscore.

Bug: 31752268
Test: m -j
Change-Id: I7748934f1e9515176e2ae98d2c0e58d165a7a5c2
parent 8f279960
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -477,7 +477,7 @@ private:
    class FlattenableHelper : public FlattenableHelperInterface {
        friend class Parcel;
        const Flattenable<T>& val;
        explicit FlattenableHelper(const Flattenable<T>& val) : val(val) { }
        explicit FlattenableHelper(const Flattenable<T>& _val) : val(_val) { }

    public:
        virtual size_t getFlattenedSize() const {
+7 −6
Original line number Diff line number Diff line
@@ -303,12 +303,13 @@ public:
        //         set this to Fence::NO_FENCE if the buffer is ready immediately
        // sticky - the sticky transform set in Surface (only used by the LEGACY
        //          camera mode).
        inline QueueBufferInput(int64_t timestamp, bool isAutoTimestamp,
                android_dataspace dataSpace, const Rect& crop, int scalingMode,
                uint32_t transform, const sp<Fence>& fence, uint32_t sticky = 0)
                : timestamp(timestamp), isAutoTimestamp(isAutoTimestamp),
                  dataSpace(dataSpace), crop(crop), scalingMode(scalingMode),
                  transform(transform), stickyTransform(sticky), fence(fence),
        inline QueueBufferInput(int64_t _timestamp, bool _isAutoTimestamp,
                android_dataspace _dataSpace, const Rect& _crop,
                int _scalingMode, uint32_t _transform, const sp<Fence>& _fence,
                uint32_t _sticky = 0)
                : timestamp(_timestamp), isAutoTimestamp(_isAutoTimestamp),
                  dataSpace(_dataSpace), crop(_crop), scalingMode(_scalingMode),
                  transform(_transform), stickyTransform(_sticky), fence(_fence),
                  surfaceDamage() { }
        inline void deflate(int64_t* outTimestamp, bool* outIsAutoTimestamp,
                android_dataspace* outDataSpace,
+10 −10
Original line number Diff line number Diff line
@@ -53,10 +53,10 @@ public:
        TYPE dy;
        inline region(const region& rhs) 
            : rects(rhs.rects), count(rhs.count), dx(rhs.dx), dy(rhs.dy) { }
        inline region(RECT const* r, size_t c) 
            : rects(r), count(c), dx(), dy() { }
        inline region(RECT const* r, size_t c, TYPE dx, TYPE dy) 
            : rects(r), count(c), dx(dx), dy(dy) { }
        inline region(RECT const* _r, size_t _c)
            : rects(_r), count(_c), dx(), dy() { }
        inline region(RECT const* _r, size_t _c, TYPE _dx, TYPE _dy)
            : rects(_r), count(_c), dx(_dx), dy(_dy) { }
    };

    class region_rasterizer {
@@ -79,8 +79,8 @@ public:
            spannerInner.prepare(inside);
            do {
                TYPE left, right;
                int inside = spannerInner.next(current.left, current.right);
                if ((op_mask >> inside) & 1) {
                int inner_inside = spannerInner.next(current.left, current.right);
                if ((op_mask >> inner_inside) & 1) {
                    if (current.left < current.right && 
                            current.top < current.bottom) {
                        rasterizer(current);
@@ -162,8 +162,8 @@ private:
        region rhs;

    public:
        inline Spanner(const region& lhs, const region& rhs)
        : lhs(lhs), rhs(rhs)
        inline Spanner(const region& _lhs, const region& _rhs)
        : lhs(_lhs), rhs(_rhs)
        {
            if (lhs.count) {
                SpannerBase::lhs_head = lhs.rects->top      + lhs.dy;
@@ -223,8 +223,8 @@ private:
        region rhs;
        
    public:
        inline SpannerInner(const region& lhs, const region& rhs)
            : lhs(lhs), rhs(rhs) 
        inline SpannerInner(const region& _lhs, const region& _rhs)
            : lhs(_lhs), rhs(_rhs)
        {
        }

+4 −4
Original line number Diff line number Diff line
@@ -124,10 +124,10 @@ private:
    // Buffer descriptor modification functions

    struct Descriptor : public std::enable_shared_from_this<Descriptor> {
        Descriptor(Gralloc1On0Adapter* adapter,
                gralloc1_buffer_descriptor_t id)
          : adapter(adapter),
            id(id),
        Descriptor(Gralloc1On0Adapter* _adapter,
                gralloc1_buffer_descriptor_t _id)
          : adapter(_adapter),
            id(_id),
            width(0),
            height(0),
            format(HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED),
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ public:
    // Default constructor doesn't initialize the Point
    inline Point() {
    }
    inline Point(int x, int y) : x(x), y(y) {
    inline Point(int _x, int _y) : x(_x), y(_y) {
    }

    inline bool operator == (const Point& rhs) const {