Skip to content

Commit 22cfa3b

Browse files
committed
index.hpp: fix build with UNICODE defined
Be explicit that we want CreateFileA here, as CreateFile will fail with an error about conversion from `const char *` to `LPCWSTR` when `UNICODE` is defined.
1 parent 5ea48c8 commit 22cfa3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/usearch/index.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ class memory_mapped_file_t {
15011501
#if defined(USEARCH_DEFINED_WINDOWS)
15021502

15031503
HANDLE file_handle =
1504-
CreateFile(path_, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
1504+
CreateFileA(path_, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
15051505
if (file_handle == INVALID_HANDLE_VALUE)
15061506
return result.failed("Opening file failed!");
15071507

0 commit comments

Comments
 (0)