Skip to content

Commit

Permalink
Cleanup|libcommon: Streaming bytes directly to a File
Browse files Browse the repository at this point in the history
When streaming directly to a File via the IOStream interface, one
does not need to use FixedByteArray as the operation will replace the
entire contents of the file. Files have built-in metadata about
their size, so size won't be included in the written data as with
Writer.
  • Loading branch information
skyjake committed Mar 28, 2014
1 parent b9e0021 commit 9473d1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/g_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3057,7 +3057,7 @@ void G_DoLeaveMap()
SV_OpenFileForWrite(mapStateData);
writer_s *writer = SV_NewWriter();
MapStateWriter().write(writer);
outFile << de::FixedByteArray(mapStateData);
outFile << mapStateData;
Writer_Delete(writer);
SV_CloseFile();

Expand Down

0 comments on commit 9473d1c

Please sign in to comment.