[General] Fix issues for vs17 compatibility

This commit is contained in:
momo5502 2017-04-28 14:18:28 +02:00
parent f85f88ea6f
commit 93e65b4767
3 changed files with 6 additions and 4 deletions

View File

@ -242,7 +242,7 @@ namespace Components
{
if (Flags::HasFlag("dump"))
{
Utils::IO::WriteFile(Utils::String::VA("raw/%s.ents", name), asset.mapEnts->entityString);
Utils::IO::WriteFile(Utils::String::VA("raw/%s.ents", name.data()), asset.mapEnts->entityString);
}
static std::string mapEntities;

View File

@ -512,7 +512,7 @@ namespace Components
formatString = "userraw/shader_bin/%.vs";
}
if (Utils::IO::FileExists(Utils::String::VA(formatString, name))) return;
if (Utils::IO::FileExists(Utils::String::VA(formatString, name.data()))) return;
Utils::Stream buffer(0x1000);
Game::MaterialPixelShader* dest = buffer.dest<Game::MaterialPixelShader>();
@ -524,7 +524,7 @@ namespace Components
Utils::Stream::ClearPointer(&dest->prog.loadDef.program);
}
Utils::IO::WriteFile(Utils::String::VA(formatString, name), buffer.toBuffer());
Utils::IO::WriteFile(Utils::String::VA(formatString, name.data()), buffer.toBuffer());
}
static std::map<const void*, unsigned int> pointerMap;

View File

@ -22,8 +22,8 @@
#pragma warning(push)
#pragma warning(disable: 4091)
#pragma warning(disable: 4244)
#include <dbghelp.h>
#pragma warning(pop)
#include <sstream>
#include <fstream>
@ -38,6 +38,8 @@
// Experimental C++17 features
#include <filesystem>
#pragma warning(pop)
#ifdef ENABLE_DXSDK
#include <d3dx9tex.h>
#pragma comment(lib, "D3dx9.lib")