From 0b3904cdaba509dbad1fb7bdaa1d8e00d482682d Mon Sep 17 00:00:00 2001 From: ahcorde Date: Fri, 9 Jul 2021 13:46:25 +0200 Subject: [PATCH 1/2] Windows fix Signed-off-by: ahcorde --- include/ignition/transport/TopicStatistics.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/ignition/transport/TopicStatistics.hh b/include/ignition/transport/TopicStatistics.hh index bffdebd0a..85c64f4c2 100644 --- a/include/ignition/transport/TopicStatistics.hh +++ b/include/ignition/transport/TopicStatistics.hh @@ -19,12 +19,22 @@ #include +#include #include #include #include #include "ignition/transport/config.hh" #include "ignition/transport/Export.hh" +#ifdef _WIN32 +#define NOMINMAX +#ifdef min + #undef min + #undef max +#endif +#include +#endif + namespace ignition { namespace transport From a57d7db9d8d3579f7129d25fa446ac500c60d2c0 Mon Sep 17 00:00:00 2001 From: ahcorde Date: Fri, 9 Jul 2021 14:10:53 +0200 Subject: [PATCH 2/2] Improve Signed-off-by: ahcorde --- include/ignition/transport/TopicStatistics.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/ignition/transport/TopicStatistics.hh b/include/ignition/transport/TopicStatistics.hh index 85c64f4c2..16b942a25 100644 --- a/include/ignition/transport/TopicStatistics.hh +++ b/include/ignition/transport/TopicStatistics.hh @@ -27,7 +27,9 @@ #include "ignition/transport/Export.hh" #ifdef _WIN32 -#define NOMINMAX +#ifndef NOMINMAX + #define NOMINMAX +#endif #ifdef min #undef min #undef max