From 65aa677afc5c151e5c8bfb1384e96caf70430153 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Wed, 24 Jun 2015 21:18:20 +0700 Subject: [PATCH] ASDisplayNodeCAssertPositiveReal and ASDisplayNodeCAssertInfOrPositiveReal permit CGFLOAT_MAX. --- Base/ASAssert.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Base/ASAssert.h b/Base/ASAssert.h index 589e954558..b0b53cc855 100644 --- a/Base/ASAssert.h +++ b/Base/ASAssert.h @@ -51,6 +51,6 @@ #define ASDisplayNodeConditionalAssert(shouldTestCondition, condition, description, ...) ASDisplayNodeAssert((!(shouldTestCondition) || (condition)), nil, (description), ##__VA_ARGS__) #define ASDisplayNodeConditionalCAssert(shouldTestCondition, condition, description, ...) ASDisplayNodeCAssert((!(shouldTestCondition) || (condition)), nil, (description), ##__VA_ARGS__) -#define ASDisplayNodeCAssertPositiveReal(description, num) ASDisplayNodeCAssert(num >= 0 && num < CGFLOAT_MAX, @"%@ must be a real positive integer.", description) -#define ASDisplayNodeCAssertInfOrPositiveReal(description, num) ASDisplayNodeCAssert(isinf(num) || (num >= 0 && num < CGFLOAT_MAX), @"%@ must be infinite or a real positive integer.", description) +#define ASDisplayNodeCAssertPositiveReal(description, num) ASDisplayNodeCAssert(num >= 0 && num <= CGFLOAT_MAX, @"%@ must be a real positive integer.", description) +#define ASDisplayNodeCAssertInfOrPositiveReal(description, num) ASDisplayNodeCAssert(isinf(num) || (num >= 0 && num <= CGFLOAT_MAX), @"%@ must be infinite or a real positive integer.", description)