mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Added readCurrentReadPosition in sf::Packet
This commit is contained in:
parent
1d20edebc7
commit
632a015663
@ -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
|
||||
///
|
||||
|
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user