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

Commit 7c05a8e1 authored by Chih-hung Hsieh's avatar Chih-hung Hsieh Committed by Gerrit Code Review
Browse files

Merge "Fix misc-macro-parentheses warnings."

parents fe18a656 bf29173d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1704,8 +1704,8 @@ int64_t AudioMixer::calculateOutputPTS(const track_t& t, int64_t basePTS,

// Needs to derive a compile time constant (constexpr).  Could be targeted to go
// to a MONOVOL mixtype based on MAX_NUM_VOLUMES, but that's an unnecessary complication.
#define MIXTYPE_MONOVOL(mixtype) (mixtype == MIXTYPE_MULTI ? MIXTYPE_MULTI_MONOVOL : \
        mixtype == MIXTYPE_MULTI_SAVEONLY ? MIXTYPE_MULTI_SAVEONLY_MONOVOL : mixtype)
#define MIXTYPE_MONOVOL(mixtype) ((mixtype) == MIXTYPE_MULTI ? MIXTYPE_MULTI_MONOVOL : \
        (mixtype) == MIXTYPE_MULTI_SAVEONLY ? MIXTYPE_MULTI_SAVEONLY_MONOVOL : (mixtype))

/* MIXTYPE     (see AudioMixerOps.h MIXTYPE_* enumeration)
 * TO: int32_t (Q4.27) or float
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ static inline T min(const T& a, const T& b)
}

#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#endif

namespace android {
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ struct StringToEnum {
};

// TODO: move to a separate file. Should be in sync with audio.h.
#define STRING_TO_ENUM(string) { #string, (uint32_t)string } // uint32_t cast removes warning
#define STRING_TO_ENUM(string) { #string, (uint32_t)(string) } // uint32_t cast removes warning
#define NAME_TO_ENUM(name, value) { name, value }
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+1 −1
Original line number Diff line number Diff line
@@ -568,7 +568,7 @@ private:
                reinterpret_cast<CameraHardwareInterface *>(user);
        return __this->mPreviewWindow.get();
    }
#define anw(n) __to_anw(((struct camera_preview_window *)n)->user)
#define anw(n) __to_anw(((struct camera_preview_window *)(n))->user)

    static int __dequeue_buffer(struct preview_stream_ops* w,
                                buffer_handle_t** buffer, int *stride)