1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

hopefully fixed things

This commit is contained in:
Zyx-2000
2016-01-09 21:23:55 +01:00
parent cdd50b1603
commit 203b2dccc3
19 changed files with 83 additions and 39 deletions

View File

@@ -1,5 +1,6 @@
#include "StdInc.h"
#include "jsonutils.h"
#include "../lib/filesystem/FileStream.h"
static QVariantMap JsonToMap(const JsonMap & json)
{
@@ -96,7 +97,11 @@ JsonNode toJson(QVariant object)
void JsonToFile(QString filename, QVariant object)
{
std::ofstream file(filename.toUtf8().data(), std::ofstream::binary);
#ifdef _WIN32
FileStream file(boost::filesystem::path(filename.toStdWString()), std::ios::out | std::ios_base::binary);
#else
FileStream file(boost::filesystem::path(filename.toUtf8().data()), std::ios::out | std::ios_base::binary);
#endif
file << toJson(object);
}