Version 1.22

Added guards for std::filesystem warnings
pull/113/head
Javidx9 5 years ago committed by GitHub
parent a72d296c14
commit 9a7fe04f3e
  1. 34
      olcPixelGameEngine.h

@ -2,7 +2,7 @@
olcPixelGameEngine.h olcPixelGameEngine.h
+-------------------------------------------------------------+ +-------------------------------------------------------------+
| OneLoneCoder Pixel Game Engine v1.21 | | OneLoneCoder Pixel Game Engine v1.22 |
| "Like the command prompt console one, but not..." - javidx9 | | "Like the command prompt console one, but not..." - javidx9 |
+-------------------------------------------------------------+ +-------------------------------------------------------------+
@ -144,7 +144,7 @@
Author Author
~~~~~~ ~~~~~~
David Barr, aka javidx9, ©OneLoneCoder 2018, 2019 David Barr, aka javidx9, ©OneLoneCoder 2018, 2019
*/ */
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
@ -246,14 +246,28 @@
#include <functional> #include <functional>
#include <algorithm> #include <algorithm>
#if __cplusplus >= 201703L #if defined(_WIN32)
// C++17 onwards #if _MSVC_LANG >= 201703L // Thanks @slavka
#include <filesystem> // C++17 onwards
namespace _gfs = std::filesystem; #include <filesystem>
#else namespace _gfs = std::filesystem;
// Older "Modern" C++ :P #else
#include <experimental/filesystem> // Older "Modern" C++ :P
namespace _gfs = std::experimental::filesystem::v1; #include <experimental/filesystem>
namespace _gfs = std::experimental::filesystem::v1;
#endif
#endif
#if defined(_linux_) || defined(__MINGW32__)
#if __cplusplus >= 201703L
// C++17 onwards
#include <filesystem>
namespace _gfs = std::filesystem;
#else
// Older "Modern" C++ :P
#include <experimental/filesystem>
namespace _gfs = std::experimental::filesystem::v1;
#endif
#endif #endif
#undef min #undef min

Loading…
Cancel
Save