Fix MSVC compiler error

This commit is contained in:
vxiiduu 2023-08-13 01:09:26 +10:00 committed by GitHub
parent 8847e95725
commit f857820e5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -281,7 +281,7 @@ struct llama_mmap {
hKernel32 = GetModuleHandleW(L"kernel32.dll");
// This call may fail if on a pre-Win8 system.
pPrefetchVirtualMemory = reinterpret_cast<decltype(pPrefetchVirtualMemory)> GetProcAddress(hKernel32, "PrefetchVirtualMemory");
pPrefetchVirtualMemory = reinterpret_cast<decltype(pPrefetchVirtualMemory)> (GetProcAddress(hKernel32, "PrefetchVirtualMemory"));
if (pPrefetchVirtualMemory) {
// Advise the kernel to preload the mapped memory.