mirror of https://github.com/stella-emu/stella.git
Slight space savings for load/save state.
This commit is contained in:
parent
ae3df81967
commit
6a17467e99
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include "StateManager.hxx"
|
#include "StateManager.hxx"
|
||||||
|
|
||||||
#define STATE_HEADER "05090101state"
|
#define STATE_HEADER "05090902state"
|
||||||
// #define MOVIE_HEADER "03030000movie"
|
// #define MOVIE_HEADER "03030000movie"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -113,7 +113,7 @@ bool DelayQueueMember<capacity>::save(Serializer& out) const
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
out.putInt(mySize); //FIXME - check datatype
|
out.putByte(mySize);
|
||||||
for(uInt8 i = 0; i < mySize; ++i)
|
for(uInt8 i = 0; i < mySize; ++i)
|
||||||
{
|
{
|
||||||
const Entry& e = myEntries[i];
|
const Entry& e = myEntries[i];
|
||||||
|
@ -136,7 +136,7 @@ bool DelayQueueMember<capacity>::load(Serializer& in)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
mySize = in.getInt(); //FIXME - check datatype
|
mySize = in.getByte();
|
||||||
if (mySize > capacity) throw new runtime_error("invalid delay queue size");
|
if (mySize > capacity) throw new runtime_error("invalid delay queue size");
|
||||||
for(uInt32 i = 0; i < mySize; ++i)
|
for(uInt32 i = 0; i < mySize; ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue