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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user