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

Commit 8cb642f9 authored by Yi Kong's avatar Yi Kong
Browse files

Suppress ordered-compare-function-pointers warning

The affected code are using function pointer comparison for legitimate
purposes. Suppress the warning.

Bug: 197230471
Test: build
Change-Id: Ief9d720ee39b8be6467e127c0d3f14b026eaf9ed
parent fdbce8a0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -139,6 +139,8 @@ class CameraManagerGlobal final : public RefBase {
            return !(*this == other);
        }
        bool operator < (const Callback& other) const {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wordered-compare-function-pointers"
            if (*this == other) return false;
            if (mContext != other.mContext) return mContext < other.mContext;
            if (mPhysicalCamAvailable != other.mPhysicalCamAvailable) {
@@ -152,6 +154,7 @@ class CameraManagerGlobal final : public RefBase {
            }
            if (mAvailable != other.mAvailable) return mAvailable < other.mAvailable;
            return mUnavailable < other.mUnavailable;
#pragma GCC diagnostic pop
        }
        bool operator > (const Callback& other) const {
            return (*this != other && !(*this < other));
+3 −0
Original line number Diff line number Diff line
@@ -135,6 +135,8 @@ class CameraManagerGlobal final : public RefBase {
            return !(*this == other);
        }
        bool operator < (const Callback& other) const {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wordered-compare-function-pointers"
            if (*this == other) return false;
            if (mContext != other.mContext) return mContext < other.mContext;
            if (mAvailable != other.mAvailable) return mAvailable < other.mAvailable;
@@ -145,6 +147,7 @@ class CameraManagerGlobal final : public RefBase {
            if (mPhysicalCamUnavailable != other.mPhysicalCamUnavailable)
                    return mPhysicalCamUnavailable < other.mPhysicalCamUnavailable;
            return mUnavailable < other.mUnavailable;
#pragma GCC diagnostic pop
        }
        bool operator > (const Callback& other) const {
            return (*this != other && !(*this < other));