From c1e2302765b84085c8a045c8d423b7303a82c109 Mon Sep 17 00:00:00 2001 From: Will Toohey Date: Sat, 27 Jun 2026 19:07:40 +1000 Subject: [PATCH] Use the right project-level macros to nuke winapi min/max --- meson.build | 7 ++++++- src/avs.cpp | 1 - src/hook.cpp | 4 ---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 72a43ca..701787b 100644 --- a/meson.build +++ b/meson.build @@ -9,7 +9,12 @@ project('layeredfs', 'c', 'cpp', version: '4.1', ) add_project_link_arguments('-static', language: 'cpp') -add_project_arguments('-DVER_STRING="' + meson.project_version() + '"', language: 'cpp') +add_project_arguments( + '-DVER_STRING="' + meson.project_version() + '"', + '-DNOMINMAX', + '-DWIN32_LEAN_AND_MEAN', + language: 'cpp', +) # note: not using fmt from the wrapdb because it needs pkgconfig which doesn't # work for cross builds diff --git a/src/avs.cpp b/src/avs.cpp index 029b426..28eb1c1 100644 --- a/src/avs.cpp +++ b/src/avs.cpp @@ -1,5 +1,4 @@ #include -#define NOMINMAX #include #include diff --git a/src/hook.cpp b/src/hook.cpp index d99deff..745d808 100644 --- a/src/hook.cpp +++ b/src/hook.cpp @@ -23,10 +23,6 @@ #include "avs.h" #include "modpath_handler.h" -// let me use the std:: version, damnit -#undef max -#undef min - #ifdef _DEBUG #define DBG_VER_STRING "_DEBUG" #else