소스 검색

Fixed build error on Windows due to `max` macro in windows.h

yhirose 1 년 전
부모
커밋
3d9cc51851
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -2872,7 +2872,7 @@ inline bool mmap::open(const char *path) {
   // See:
   // https://github.com/yhirose/cpp-httplib/issues/1903#issuecomment-2316520721
   if (static_cast<ULONGLONG>(size.QuadPart) >
-      std::numeric_limits<decltype(size_)>::max()) {
+      (std::numeric_limits<decltype(size_)>::max)()) {
     // `size_t` might be 32-bits, on 32-bits Windows.
     return false;
   }