mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
get rid of HAS_STD_FILESYSTEM
just use std::filesystem
This commit is contained in:
@ -3,12 +3,6 @@
|
||||
|
||||
#include "Core/Boot/Boot.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <filesystem>
|
||||
namespace fs = std::filesystem;
|
||||
#define HAS_STD_FILESYSTEM
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstring>
|
||||
@ -67,10 +61,6 @@ namespace fs = std::filesystem;
|
||||
static std::vector<std::string> ReadM3UFile(const std::string& m3u_path,
|
||||
const std::string& folder_path)
|
||||
{
|
||||
#ifndef HAS_STD_FILESYSTEM
|
||||
ASSERT(folder_path.back() == '/');
|
||||
#endif
|
||||
|
||||
std::vector<std::string> result;
|
||||
std::vector<std::string> nonexistent;
|
||||
|
||||
@ -91,12 +81,7 @@ static std::vector<std::string> ReadM3UFile(const std::string& m3u_path,
|
||||
|
||||
if (!line.empty() && line.front() != '#') // Comments start with #
|
||||
{
|
||||
#ifdef HAS_STD_FILESYSTEM
|
||||
const std::string path_to_add = PathToString(StringToPath(folder_path) / StringToPath(line));
|
||||
#else
|
||||
const std::string path_to_add = line.front() != '/' ? folder_path + line : line;
|
||||
#endif
|
||||
|
||||
(File::Exists(path_to_add) ? result : nonexistent).push_back(path_to_add);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user