Minor refactoring.

This commit is contained in:
Stephen Anthony 2019-04-20 17:34:10 -02:30
parent 5d6a0f9dbb
commit efb196224a
2 changed files with 11 additions and 11 deletions

View File

@ -77,12 +77,6 @@ Serializer::Serializer()
} }
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt32 Serializer::size() const
{
return myStream->tellp();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Serializer::rewind() void Serializer::rewind()
{ {
@ -91,6 +85,12 @@ void Serializer::rewind()
myStream->seekp(ios_base::beg); myStream->seekp(ios_base::beg);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt32 Serializer::size() const
{
return myStream->tellp();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8 Serializer::getByte() const uInt8 Serializer::getByte() const
{ {

View File

@ -61,6 +61,11 @@ class Serializer
*/ */
void rewind(); void rewind();
/**
Returns the current write pointer location.
*/
uInt32 size() const;
/** /**
Reads a byte value (unsigned 8-bit) from the current input stream. Reads a byte value (unsigned 8-bit) from the current input stream.
@ -207,11 +212,6 @@ class Serializer
*/ */
void putBool(bool b); void putBool(bool b);
/**
Returns the write ptr location
*/
uInt32 size() const;
private: private:
// The stream to send the serialized data to. // The stream to send the serialized data to.
unique_ptr<iostream> myStream; unique_ptr<iostream> myStream;