1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-07-08 13:54:52 +02:00

Don't cast from wide chars to chars on windows

This commit is contained in:
Daniel Evans 2016-09-09 00:07:17 +01:00
parent 62d0bf796a
commit 239d19a310
2 changed files with 2 additions and 2 deletions

View File

@ -290,7 +290,7 @@ void GameData::loadGXT(const std::string &name)
void GameData::loadWaterpro(const std::string& path)
{
auto syspath = index.findFilePath(path);
std::ifstream ifstr((const char*)syspath.c_str(), std::ios_base::binary);
std::ifstream ifstr(syspath.string(), std::ios_base::binary);
if(ifstr.is_open()) {
uint32_t numlevels;

View File

@ -23,7 +23,7 @@ void FileIndex::indexGameDirectory(const fs::path& base_path)
FileHandle FileIndex::openFilePath(const std::string &file_path)
{
auto datapath = findFilePath(file_path);
std::ifstream dfile((const char*)datapath.c_str(), std::ios_base::binary | std::ios_base::ate);
std::ifstream dfile(datapath.string(), std::ios_base::binary | std::ios_base::ate);
if ( ! dfile.is_open()) {
throw std::runtime_error("Unable to open file: " + file_path);
}