Compare commits
1 Commits
runtime_in
...
use-rcpput
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23ad2b4a4e |
@@ -21,6 +21,13 @@
|
||||
#include "rcl/time.h"
|
||||
#include "rclcpp/visibility_control.hpp"
|
||||
|
||||
// Windows has preprocessor defines for "min" and "max", which can cause
|
||||
// problems when things like std::numeric_limits<int>::max are used. This
|
||||
// macro is used to defeat the macro matching logic and hence workaround the
|
||||
// issue. The idea comes from:
|
||||
// https://stackoverflow.com/questions/11544073/how-do-i-deal-with-the-max-macro-in-windows-h-colliding-with-max-in-std/11550864#11550864
|
||||
#define PREVENT_WINDOWS_MIN_MAX
|
||||
|
||||
namespace rclcpp
|
||||
{
|
||||
class RCLCPP_PUBLIC Duration
|
||||
@@ -108,7 +115,7 @@ public:
|
||||
*/
|
||||
static
|
||||
Duration
|
||||
max();
|
||||
max PREVENT_WINDOWS_MIN_MAX();
|
||||
|
||||
Duration
|
||||
operator*(double scale) const;
|
||||
|
||||
@@ -23,6 +23,13 @@
|
||||
|
||||
#include "rclcpp/duration.hpp"
|
||||
|
||||
// Windows has preprocessor defines for "min" and "max", which can cause
|
||||
// problems when things like std::numeric_limits<int>::max are used. This
|
||||
// macro is used to defeat the macro matching logic and hence workaround the
|
||||
// issue. The idea comes from:
|
||||
// https://stackoverflow.com/questions/11544073/how-do-i-deal-with-the-max-macro-in-windows-h-colliding-with-max-in-std/11550864#11550864
|
||||
#define PREVENT_WINDOWS_MIN_MAX
|
||||
|
||||
namespace rclcpp
|
||||
{
|
||||
|
||||
@@ -189,7 +196,7 @@ public:
|
||||
*/
|
||||
RCLCPP_PUBLIC
|
||||
static Time
|
||||
max();
|
||||
max PREVENT_WINDOWS_MIN_MAX();
|
||||
|
||||
/// Get the seconds since epoch
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user