mirror of https://github.com/stella-emu/stella.git
Minor refactoring.
This commit is contained in:
parent
5d6a0f9dbb
commit
efb196224a
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue