Ensure MIN/MAX overrides

This commit is contained in:
Scott Lahteine 2018-10-01 04:54:00 -05:00
parent 3019713402
commit f4c625d3a1
3 changed files with 17 additions and 15 deletions

View file

@ -20,13 +20,14 @@
* *
*/ */
#pragma once
#undef MIN #undef MIN
#undef MAX #undef MAX
#ifdef __cplusplus #ifdef __cplusplus
#ifndef _MINMAX_H_
#define _MINMAX_H_
extern "C++" { extern "C++" {
// C++11 solution that is standards compliant. Return type is deduced automatically // C++11 solution that is standards compliant. Return type is deduced automatically
@ -41,6 +42,8 @@
} }
#endif
#else #else
// NUM_ARGS(...) evaluates to the number of arguments // NUM_ARGS(...) evaluates to the number of arguments

View file

@ -43,5 +43,6 @@
#include "../core/language.h" #include "../core/language.h"
#include "../core/utility.h" #include "../core/utility.h"
#include "../core/serial.h" #include "../core/serial.h"
#include "../core/minmax.h"
#endif // _MARLIN_CONFIG_H_ #endif // _MARLIN_CONFIG_H_

View file

@ -145,8 +145,6 @@ typedef int32_t(*PFI)();
/* External data/function define */ /* External data/function define */
#define EXTERN extern #define EXTERN extern
#include "../../../../src/core/minmax.h"
/** /**
* @} * @}
*/ */