Added readCurrentReadPosition in sf::Packet

This commit is contained in:
Michal Marszalek 2018-03-10 19:20:04 +01:00 committed by Lukas Dürrenberger
parent 1d20edebc7
commit 632a015663
2 changed files with 18 additions and 0 deletions

View File

@ -72,10 +72,21 @@ public:
/// \param sizeInBytes Number of bytes to append
///
/// \see clear
/// \see readCurrentReadPosition
///
////////////////////////////////////////////////////////////
void append(const void* data, std::size_t sizeInBytes);
////////////////////////////////////////////////////////////
/// \brief Get a current reading position
///
/// \return Current position
///
/// \see append
///
////////////////////////////////////////////////////////////
std::size_t getReadPosition() const;
////////////////////////////////////////////////////////////
/// \brief Clear the packet
///

View File

@ -63,6 +63,13 @@ void Packet::append(const void* data, std::size_t sizeInBytes)
}
////////////////////////////////////////////////////////////
std::size_t Packet::getReadPosition() const
{
return m_readPos;
}
////////////////////////////////////////////////////////////
void Packet::clear()
{