Alias filesystem namespace + attempt at fixing Windows compilation

This commit is contained in:
Simone Coco
2022-12-19 15:25:01 +01:00
committed by GitHub
parent 03c6231742
commit ba62db8f12
5 changed files with 24 additions and 23 deletions

View File

@@ -8,7 +8,7 @@
#include <execution>
using namespace nlohmann;
using namespace std::filesystem;
namespace fs = std::filesystem;
GameList::GameList(const std::string& path) {
if(!path.empty()) {
@@ -16,7 +16,7 @@ GameList::GameList(const std::string& path) {
json gameDb = json::parse(gameDbFile);
std::vector<u8> rom{};
for(const auto& p : directory_iterator{path}) {
for(const auto& p : fs::directory_iterator{path}) {
const auto filename = p.path().string();
if(p.path().extension() == ".n64" || p.path().extension() == ".z64" || p.path().extension() == ".v64" ||
p.path().extension() == ".N64" || p.path().extension() == ".Z64" || p.path().extension() == ".V64") {