account.amount and .total return simplified values
This commit is contained in:
parent
16a2a16097
commit
115da19121
2 changed files with 4 additions and 2 deletions
|
|
@ -180,11 +180,11 @@ namespace {
|
|||
}
|
||||
|
||||
value_t get_amount(account_t& account) {
|
||||
return VALUE_OR_ZERO(account.amount());
|
||||
return SIMPLIFIED_VALUE_OR_ZERO(account.amount());
|
||||
}
|
||||
|
||||
value_t get_total(account_t& account) {
|
||||
return VALUE_OR_ZERO(account.total());
|
||||
return SIMPLIFIED_VALUE_OR_ZERO(account.total());
|
||||
}
|
||||
|
||||
value_t get_subcount(account_t& account) {
|
||||
|
|
|
|||
|
|
@ -946,6 +946,8 @@ inline value_t string_value(const string& str = "") {
|
|||
}
|
||||
|
||||
#define VALUE_OR_ZERO(val) ((val).is_null() ? value_t(0L) : (val))
|
||||
#define SIMPLIFIED_VALUE_OR_ZERO(val) \
|
||||
((val).is_null() ? value_t(0L) : (val).simplified())
|
||||
|
||||
inline value_t mask_value(const string& str) {
|
||||
return value_t(mask_t(str));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue