diff options
author | Glenn Kasten <gkasten@google.com> | 2014-02-07 20:49:21 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-02-07 20:49:22 +0000 |
commit | a793625031a3e326a261a0843598c35a5784bbde (patch) | |
tree | f18a01ac2ead0114a2a46783b3ef79a013fb85e7 /media/libnbaio/NBAIO.cpp | |
parent | 19f420ea68424a608e982d39ab76676a05337685 (diff) | |
parent | 6e0d67d7b496ce17c0970a4ffd3a6f808860949c (diff) | |
download | frameworks_av-a793625031a3e326a261a0843598c35a5784bbde.zip frameworks_av-a793625031a3e326a261a0843598c35a5784bbde.tar.gz frameworks_av-a793625031a3e326a261a0843598c35a5784bbde.tar.bz2 |
Merge "Use Format_isValid() and Format_isEqual() instead of direct comparison"
Diffstat (limited to 'media/libnbaio/NBAIO.cpp')
-rw-r--r-- | media/libnbaio/NBAIO.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/media/libnbaio/NBAIO.cpp b/media/libnbaio/NBAIO.cpp index cc12671..18e0252 100644 --- a/media/libnbaio/NBAIO.cpp +++ b/media/libnbaio/NBAIO.cpp @@ -55,7 +55,7 @@ enum { unsigned Format_sampleRate(const NBAIO_Format& format) { - if (format == Format_Invalid) { + if (!Format_isValid(format)) { return 0; } switch (format & Format_SR_Mask) { @@ -82,7 +82,7 @@ unsigned Format_sampleRate(const NBAIO_Format& format) unsigned Format_channelCount(const NBAIO_Format& format) { - if (format == Format_Invalid) { + if (!Format_isValid(format)) { return 0; } switch (format & Format_C_Mask) { @@ -218,9 +218,9 @@ ssize_t NBAIO_Port::negotiate(const NBAIO_Format offers[], size_t numOffers, { ALOGV("negotiate offers=%p numOffers=%u countersOffers=%p numCounterOffers=%u", offers, numOffers, counterOffers, numCounterOffers); - if (mFormat != Format_Invalid) { + if (Format_isValid(mFormat)) { for (size_t i = 0; i < numOffers; ++i) { - if (offers[i] == mFormat) { + if (Format_isEqual(offers[i], mFormat)) { mNegotiated = true; return i; } |