From d3c93b73cb4bbc496c8b1f89d19c5c180fc38659 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 5 Mar 2009 21:00:32 -0400 Subject: Added a value_t macro: VALUE_OR_VERO --- src/value.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/value.h') diff --git a/src/value.h b/src/value.h index 410ff22a..1e972558 100644 --- a/src/value.h +++ b/src/value.h @@ -930,6 +930,8 @@ inline value_t string_value(const string& str) { return value_t(str, true); } +#define VALUE_OR_ZERO(val) ((val).is_null() ? value_t(0L) : (val)) + inline value_t mask_value(const string& str) { return value_t(mask_t(str)); } -- cgit v1.2.3