Core/SerializationContext: Replaced currentBitPos and currentByte by [read|write][BitPos][Byte] to handle properly bit reading/writing

This commit is contained in:
Jérôme Leclercq
2018-05-31 16:10:58 +02:00
parent 33fb70b65b
commit 550176e198
5 changed files with 36 additions and 24 deletions

View File

@@ -7,16 +7,24 @@
namespace Nz
{
/*!
* \brief Reset the current bit cursor
* \brief Reset the current read bit cursor
*/
inline void SerializationContext::ResetReadBitPosition()
{
readBitPos = 8;
}
/*!
* \brief Reset the current read bit cursor
* \remark This function only reset the cursor position, it doesn't do any writing
if you wish to write all bits and reset bit position, call FlushBits
if you wish to write all bits and reset bit position, call FlushBits
\see FlushBits
\see FlushBits
*/
inline void SerializationContext::ResetBitPosition()
inline void SerializationContext::ResetWriteBitPosition()
{
currentBitPos = 8;
writeBitPos = 8;
}
}