Skip to content

Commit

Permalink
Merge pull request #46 from HR1025/h264
Browse files Browse the repository at this point in the history
[what][style][h264] 处理 MSVC 编译警告
  • Loading branch information
HR1025 authored Aug 26, 2024
2 parents a444c3d + b1d2cea commit 5df8003
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions H26xBinaryReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ void H26xBinaryReader::SE(int32_t& value)
UE(codeNum);
if (codeNum % 2 == 0)
{
value = -(codeNum >> 1);
value = -static_cast<int32_t>(codeNum >> 1);
}
else
{
value = (codeNum >> 1) + 1;
value = static_cast<int32_t>((codeNum >> 1) + 1);
}
}

Expand All @@ -95,7 +95,7 @@ void H26xBinaryReader::SE(int32_t& value)
do\
{\
ReadOneByteAuto();\
size_t readBits = (size_t)bits <= (8 - (size_t)_curBitPos)? bits : (8 - (size_t)_curBitPos);\
size_t readBits = bits <= (size_t)(8 - _curBitPos)? bits : (size_t)(8 - (uint8_t)_curBitPos);\
bits = (size_t)(bits - readBits);\
value <<= readBits;\
if (readBits < 8 && !firstFlag)\
Expand All @@ -110,7 +110,7 @@ void H26xBinaryReader::SE(int32_t& value)
{\
value |= _curValue;\
}\
_curBitPos = _curBitPos + readBits;\
_curBitPos = _curBitPos + (uint8_t)readBits;\
firstFlag = true;\
} while (bits != 0);

Expand Down

0 comments on commit 5df8003

Please sign in to comment.