mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Remove use of std::filesystem
This appears to break compatibility with macOS 10.9
This commit is contained in:
@@ -13,7 +13,6 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <filesystem>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <ios>
|
#include <ios>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -48,7 +47,7 @@ public:
|
|||||||
* This should only be called once, and before doing any `->` operations.
|
* This should only be called once, and before doing any `->` operations.
|
||||||
* Returns `nullptr` on error, and a non-null pointer otherwise.
|
* Returns `nullptr` on error, and a non-null pointer otherwise.
|
||||||
*/
|
*/
|
||||||
File *open(std::filesystem::path const &path, std::ios_base::openmode mode) {
|
File *open(std::string const &path, std::ios_base::openmode mode) {
|
||||||
if (path != "-") {
|
if (path != "-") {
|
||||||
return _file.emplace<std::filebuf>().open(path, mode) ? this : nullptr;
|
return _file.emplace<std::filebuf>().open(path, mode) ? this : nullptr;
|
||||||
} else if (mode & std::ios_base::in) {
|
} else if (mode & std::ios_base::in) {
|
||||||
|
|||||||
Reference in New Issue
Block a user