Skip to content

Commit

Permalink
Silence warnings from Clang about using bitwise | with boolean operan…
Browse files Browse the repository at this point in the history
…ds (#3605)

This fixes the following warnings:

codec/decoder/core/src/mv_pred.cpp:398:25: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
  bool bSkipOrDirect = (IS_SKIP (GetMbType (pCurDqLayer)[iMbXy]) | IS_DIRECT (GetMbType (pCurDqLayer)[iMbXy])) > 0;
                       ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                 ||

codec/decoder/core/src/mv_pred.cpp:618:25: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
  bool bSkipOrDirect = (IS_SKIP (GetMbType (pCurDqLayer)[iMbXy]) | IS_DIRECT (GetMbType (pCurDqLayer)[iMbXy])) > 0;
                       ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                 ||
  • Loading branch information
mstorsjo authored Dec 22, 2022
1 parent d2f5b21 commit b044589
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codec/decoder/core/src/mv_pred.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ int32_t PredMvBDirectSpatial (PWelsDecoderContext pCtx, int16_t iMvp[LIST_A][2],
int32_t ret = ERR_NONE;
PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
int32_t iMbXy = pCurDqLayer->iMbXyIndex;
bool bSkipOrDirect = (IS_SKIP (GetMbType (pCurDqLayer)[iMbXy]) | IS_DIRECT (GetMbType (pCurDqLayer)[iMbXy])) > 0;
bool bSkipOrDirect = (IS_SKIP (GetMbType (pCurDqLayer)[iMbXy]) || IS_DIRECT (GetMbType (pCurDqLayer)[iMbXy]));

MbType mbType;
ret = GetColocatedMb (pCtx, mbType, subMbType);
Expand Down Expand Up @@ -615,7 +615,7 @@ int32_t PredBDirectTemporal (PWelsDecoderContext pCtx, int16_t iMvp[LIST_A][2],
int32_t ret = ERR_NONE;
PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
int32_t iMbXy = pCurDqLayer->iMbXyIndex;
bool bSkipOrDirect = (IS_SKIP (GetMbType (pCurDqLayer)[iMbXy]) | IS_DIRECT (GetMbType (pCurDqLayer)[iMbXy])) > 0;
bool bSkipOrDirect = (IS_SKIP (GetMbType (pCurDqLayer)[iMbXy]) || IS_DIRECT (GetMbType (pCurDqLayer)[iMbXy]));

MbType mbType;
ret = GetColocatedMb (pCtx, mbType, subMbType);
Expand Down

0 comments on commit b044589

Please sign in to comment.