From 61cab4a3113539df9cb91e171c59550e1774a741 Mon Sep 17 00:00:00 2001 From: UIS Date: Thu, 3 Dec 2020 11:05:55 +0300 Subject: [PATCH] Use std::filesystem instead experimental one --- src/AssetManager.cpp | 5 ++--- src/ModLoader.cpp | 2 ++ src/ModLoader.hpp | 5 ++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/AssetManager.cpp b/src/AssetManager.cpp index 37a72d67..033daae8 100644 --- a/src/AssetManager.cpp +++ b/src/AssetManager.cpp @@ -1,8 +1,7 @@ #include "AssetManager.hpp" #include "ModLoader.hpp" -#include -#include +#include #include #include @@ -12,7 +11,7 @@ #include "Utility.hpp" #include "Plugin.hpp" -namespace fs = std::experimental::filesystem::v1; +namespace fs = std::filesystem; const fs::path pathToAssets = "./assets/"; const std::string pathToAssetsList = "./items.json"; diff --git a/src/ModLoader.cpp b/src/ModLoader.cpp index 9aa356e0..9fb13781 100644 --- a/src/ModLoader.cpp +++ b/src/ModLoader.cpp @@ -6,6 +6,8 @@ #include #include +namespace fs = std::filesystem; + static std::vector> mods; void ModLoader::LoadMod(AssetTreeNode &node) noexcept { diff --git a/src/ModLoader.hpp b/src/ModLoader.hpp index 1eea26a7..cd98ad6c 100644 --- a/src/ModLoader.hpp +++ b/src/ModLoader.hpp @@ -1,10 +1,9 @@ #pragma once #include "AssetManager.hpp" -#include +#include namespace ModLoader { - namespace fs = std::experimental::filesystem::v1; struct Mod{ std::string modid; std::string dirname; @@ -31,7 +30,7 @@ namespace ModLoader { void ParseAssetLua(AssetTreeNode &node) noexcept; void ParseAssetSound(AssetTreeNode &node) noexcept; - void WalkDirEntry(const fs::directory_entry &dirEntry, AssetTreeNode *node) noexcept; + void WalkDirEntry(const std::filesystem::directory_entry &dirEntry, AssetTreeNode *node) noexcept; void RecursiveWalkAssetFiles(AssetTreeNode &assetNode, std::function fnc) noexcept; void RecursiveWalkAssetPath(const std::string &assetPath, std::function fnc) noexcept;