diff options
author | John Wiegley <johnw@newartisans.com> | 2009-03-05 21:00:32 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-03-05 21:00:32 -0400 |
commit | d3c93b73cb4bbc496c8b1f89d19c5c180fc38659 (patch) | |
tree | f72e8f2ac266f8ffb102ce67bf0b009397ff2624 /src/value.h | |
parent | 17cbb9d21054ac40301099b7bac9f745433b3d7b (diff) | |
download | fork-ledger-d3c93b73cb4bbc496c8b1f89d19c5c180fc38659.tar.gz fork-ledger-d3c93b73cb4bbc496c8b1f89d19c5c180fc38659.tar.bz2 fork-ledger-d3c93b73cb4bbc496c8b1f89d19c5c180fc38659.zip |
Added a value_t macro: VALUE_OR_VERO
Diffstat (limited to 'src/value.h')
-rw-r--r-- | src/value.h | 2 |
1 files changed, 2 insertions, 0 deletions
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)); } |