Skip to content

Commit

Permalink
src: add CHECK_{GE,GT,LE,LT} macros
Browse files Browse the repository at this point in the history
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)".)
  • Loading branch information
bnoordhuis authored and indutny committed Mar 16, 2014
1 parent 8eb7607 commit ad15d75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/util.h
Expand Up @@ -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()
Expand Down

0 comments on commit ad15d75

Please sign in to comment.