From ad15d75750d4482a752b84f3e599c6c6d16203e9 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 15 Mar 2014 01:25:53 +0100 Subject: [PATCH] src: add CHECK_{GE,GT,LE,LT} macros Conform to the Google styleguide more and make cpplint happy, add more CHECK macros. Preemptively addresses cpplint's readability/check warnings ("Consider using CHECK_GT instead of CHECK(a > b)".) --- src/util.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util.h b/src/util.h index d8e0a977f95..05a7dae25cf 100644 --- a/src/util.h +++ b/src/util.h @@ -55,6 +55,10 @@ namespace node { #endif #define CHECK_EQ(a, b) CHECK((a) == (b)) +#define CHECK_GE(a, b) CHECK((a) >= (b)) +#define CHECK_GT(a, b) CHECK((a) > (b)) +#define CHECK_LE(a, b) CHECK((a) <= (b)) +#define CHECK_LT(a, b) CHECK((a) < (b)) #define CHECK_NE(a, b) CHECK((a) != (b)) #define UNREACHABLE() abort()