mirror of
https://github.com/input-leap/input-leap.git
synced 2025-12-13 20:36:57 +01:00
Partially revert "Remove the gulrak submodule"
This reverts commit 376518a6ec.
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
||||
[submodule "ext/gtest"]
|
||||
path = ext/gtest
|
||||
url = https://github.com/google/googletest.git
|
||||
[submodule "ext/gulrak-filesystem"]
|
||||
path = ext/gulrak-filesystem
|
||||
url = https://github.com/gulrak/filesystem
|
||||
|
||||
1
ext/gulrak-filesystem
Submodule
1
ext/gulrak-filesystem
Submodule
Submodule ext/gulrak-filesystem added at 614bbe87b8
@@ -15,6 +15,9 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// this header must come first so that it picks up the filesystem implementation
|
||||
#include <ghc/fs_impl.hpp>
|
||||
|
||||
#include "filesystem.h"
|
||||
#if SYSAPI_WIN32
|
||||
#include "common/win32/encoding_utilities.h"
|
||||
@@ -28,7 +31,13 @@ namespace {
|
||||
template<class Stream>
|
||||
void open_utf8_path_impl(Stream& stream, const fs::path& path, std::ios_base::openmode mode)
|
||||
{
|
||||
#if SYSAPI_WIN32
|
||||
// on Windows we need to use a non-standard constructor from wchar_t* string
|
||||
// which fs::path::native() returns
|
||||
stream.open(path.native().c_str(), mode);
|
||||
#else
|
||||
stream.open(path.native().c_str(), mode);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
#include <cstdio>
|
||||
#include <iosfwd>
|
||||
#include <ios>
|
||||
#include <filesystem>
|
||||
#include <ghc/fs_fwd.hpp>
|
||||
|
||||
namespace inputleap {
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
namespace fs = ghc::filesystem;
|
||||
|
||||
void open_utf8_path(std::ifstream& stream, const fs::path& path,
|
||||
std::ios_base::openmode mode = std::ios_base::in);
|
||||
|
||||
Reference in New Issue
Block a user