From 32345f7000ef3118a23efea47456f6e62470e360 Mon Sep 17 00:00:00 2001 From: Dom Newman Date: Sat, 7 Nov 2020 20:54:51 +0000 Subject: [PATCH] use std::ifstream f(path.c_str() for linux too Not sure if this is just a my machine thing, but I couldn't compile without these changes on linux. --- olcConsoleGameEngineSDL.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/olcConsoleGameEngineSDL.h b/olcConsoleGameEngineSDL.h index 0859b2e..cac7475 100644 --- a/olcConsoleGameEngineSDL.h +++ b/olcConsoleGameEngineSDL.h @@ -377,7 +377,7 @@ class olcSprite { std::string path(sFile.begin(), sFile.end()); -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__linux) std::ofstream f(path.c_str(), std::ios::out | std::ios::binary); #else std::ofstream f(sFile.c_str(), std::ios::out | std::ios::binary); @@ -403,7 +403,7 @@ class olcSprite std::string path(sFile.begin(), sFile.end()); -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__linux) std::ifstream f(path.c_str(), std::ios::in | std::ios::binary); #else std::ifstream f(sFile.c_str(), std::ios::in | std::ios::binary);