use experimental filesystem path for Ubuntu 18.04
This commit is contained in:
parent
6fdfa67c41
commit
65eead0079
|
@ -32,7 +32,7 @@ class Configuration : public Node
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Animation auto_refresher = Animation(std::bind(&Configuration::refresh, this));
|
Animation auto_refresher = Animation(std::bind(&Configuration::refresh, this));
|
||||||
std::filesystem::file_time_type config_modification_time = std::filesystem::file_time_type::clock::now();
|
fs::file_time_type config_modification_time = fs::file_time_type::clock::now();
|
||||||
std::vector<fs::path> files_to_refresh;
|
std::vector<fs::path> files_to_refresh;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -267,11 +267,11 @@ namespace glm
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Extend std::filesystem so nlohmann::json can read and write std::filesystem::path */
|
/* Extend std::filesystem so nlohmann::json can read and write std::filesystem::path */
|
||||||
// #if defined(__MINGW32__)
|
#if defined(__UBUNTU18__)
|
||||||
// namespace std::experimental::filesystem
|
namespace std::experimental::filesystem
|
||||||
// #else
|
#else
|
||||||
namespace std::filesystem
|
namespace std::filesystem
|
||||||
// #endif
|
#endif
|
||||||
{
|
{
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void to_json(nlohmann::json& j, const path& p)
|
void to_json(nlohmann::json& j, const path& p)
|
||||||
|
|
|
@ -53,7 +53,7 @@ Game::Game(std::initializer_list<std::string> configuration_merge)
|
||||||
|
|
||||||
/* Log the current working directory as seen by std::filesystem */
|
/* Log the current working directory as seen by std::filesystem */
|
||||||
std::ostringstream log_message;
|
std::ostringstream log_message;
|
||||||
log_message << "Current path as seen by std::filesystem is " << std::filesystem::current_path();
|
log_message << "Current path as seen by std::filesystem is " << fs::current_path();
|
||||||
sb::Log::log(log_message);
|
sb::Log::log(log_message);
|
||||||
|
|
||||||
/* Load the key mappings into the input manager object */
|
/* Load the key mappings into the input manager object */
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/* MinGW filesystem library is in another location */
|
/* C++17's filesystem library is still experimental in Ubuntu 18.04's clang-10 */
|
||||||
// #if defined(__MINGW32__)
|
#if defined(__UBUNTU18__)
|
||||||
// #include <experimental/filesystem>
|
#include <experimental/filesystem>
|
||||||
// namespace fs = std::experimental::filesystem;
|
namespace fs = std::experimental::filesystem;
|
||||||
// #else
|
#else
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
// #endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue