This repository was archived by the owner on Aug 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
external-file-loader/include Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 4
4
#include < functional>
5
5
#include < unordered_map>
6
6
#include < vector>
7
+ #include < cstring>
7
8
8
9
namespace fs = std::filesystem;
9
10
@@ -14,22 +15,22 @@ namespace std
14
15
template <> struct hash <fs::path> {
15
16
size_t operator ()(const fs::path &x) const
16
17
{
17
- auto c = x.lexically_normal ().u8string ();
18
- utf8upr (c.data ());
18
+ auto c = x.lexically_normal ().wstring ();
19
+ auto s = _wcsupr (c.data ());
19
20
20
- return fs::hash_value (c );
21
+ return fs::hash_value (s );
21
22
}
22
23
};
23
24
24
25
template <> struct equal_to <fs::path> {
25
26
bool operator ()(const fs::path &l, const fs::path &r) const {
26
- auto left = l.lexically_normal ().u8string ();
27
- utf8upr (left.data ());
27
+ auto left = l.lexically_normal ().wstring ();
28
+ auto ls = _wcsupr (left.data ());
28
29
29
- auto right = r.lexically_normal ().u8string ();
30
- utf8upr (right.data ());
30
+ auto right = r.lexically_normal ().wstring ();
31
+ auto rs = _wcsupr (right.data ());
31
32
32
- return left == right ;
33
+ return wcscmp (ls, rs) == 0 ;
33
34
}
34
35
};
35
36
Original file line number Diff line number Diff line change 3
3
// clang-format off
4
4
#define VERSION_MAJOR 0
5
5
#define VERSION_MINOR 8
6
- #define VERSION_REVISION 1
6
+ #define VERSION_REVISION 2
7
7
8
8
#define STRINGIFY_ (s ) #s
9
9
#define STRINGIFY (s ) STRINGIFY_(s)
You can’t perform that action at this time.
0 commit comments