From 3e2cc15558c4b3d3949a11a861beb8d3d860a241 Mon Sep 17 00:00:00 2001 From: Stephen Webb Date: Wed, 16 Oct 2024 23:00:47 +1100 Subject: [PATCH] Fix compiler error --- src/test/cpp/asyncappendertestcase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/cpp/asyncappendertestcase.cpp b/src/test/cpp/asyncappendertestcase.cpp index 87b7d9135..002fe0c4d 100644 --- a/src/test/cpp/asyncappendertestcase.cpp +++ b/src/test/cpp/asyncappendertestcase.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#define NOMINMAX #include "logunit.h" #include @@ -235,7 +236,7 @@ class AsyncAppenderTestCase : public AppenderSkeletonTestCase void testMultiThread() { int LEN = 2000; // Larger than default buffer size (128) - int threadCount = max(std::thread::hardware_concurrency(), 2); + int threadCount = std::max(std::thread::hardware_concurrency(), static_cast(2)); auto root = Logger::getRootLogger(); auto vectorAppender = std::make_shared(); auto asyncAppender = std::make_shared();