Skip to content

Commit

Permalink
Code tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dictoon committed Nov 28, 2015
1 parent 2e5a0d1 commit caeaf26
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/appleseed-renderer/appleseedrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ IOResult AppleseedRenderer::Save(ISave* isave)
{
bool success = true;

isave->BeginChunk(CHUNK_PLUGIN_VERSION);
success &= write(isave, PLUGIN_VERSION);
isave->BeginChunk(CHUNK_FILE_FORMAT_VERSION);
success &= write(isave, FILE_FORMAT_VERSION);
isave->EndChunk();

isave->BeginChunk(CHUNK_SETTINGS);
Expand All @@ -398,7 +398,7 @@ IOResult AppleseedRenderer::Load(ILoad* iload)

switch (iload->CurChunkID())
{
case CHUNK_PLUGIN_VERSION:
case CHUNK_FILE_FORMAT_VERSION:
{
USHORT version;
result = read<USHORT>(iload, &version);
Expand Down
2 changes: 1 addition & 1 deletion src/appleseed-renderer/datachunks.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// appleseed.foundation headers.
#include "foundation/platform/windows.h"

const USHORT CHUNK_PLUGIN_VERSION = 0x0001;
const USHORT CHUNK_FILE_FORMAT_VERSION = 0x0001;

const USHORT CHUNK_SETTINGS = 0x1000;

Expand Down
4 changes: 3 additions & 1 deletion src/appleseed-renderer/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@
// appleseed.foundation headers.
#include "foundation/platform/windows.h"

const USHORT PLUGIN_VERSION = 0x0001;
// Version of the file format.
// Increment when making incompatible changes to the file format.
const USHORT FILE_FORMAT_VERSION = 0x0001;

0 comments on commit caeaf26

Please sign in to comment.