1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Serializer refactoring: fix FileStream usage for game loading

Miss this one rebase. Without this one non-English characters in paths to saves cause issues.
This commit is contained in:
Arseniy Shestakov
2016-10-30 15:14:59 +03:00
parent a1cca251ec
commit e79c522c4b
3 changed files with 11 additions and 9 deletions

View File

@@ -15,7 +15,8 @@
extern template void registerTypes<BinarySerializer>(BinarySerializer & s);
CSaveFile::CSaveFile(const boost::filesystem::path &fname): serializer(this)
CSaveFile::CSaveFile(const boost::filesystem::path &fname)
: serializer(this)
{
registerTypes(serializer);
openNextFile(fname);
@@ -25,7 +26,7 @@ CSaveFile::~CSaveFile()
{
}
int CSaveFile::write( const void * data, unsigned size )
int CSaveFile::write(const void * data, unsigned size)
{
sfile->write((char *)data,size);
return size;
@@ -68,7 +69,7 @@ void CSaveFile::clear()
sfile = nullptr;
}
void CSaveFile::putMagicBytes( const std::string &text )
void CSaveFile::putMagicBytes(const std::string &text)
{
write(text.c_str(), text.length());
}