diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-26 23:55:06 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-26 23:55:06 -0400 |
commit | 9b7725ee181617b2e0ea13189837b0724ab964b8 (patch) | |
tree | c69dd5865a7c6e32ff824984a914924450ca4947 /amount.h | |
parent | 7848dbd7f76e580760b585eba3f67cf3a4ebaed9 (diff) | |
download | fork-ledger-9b7725ee181617b2e0ea13189837b0724ab964b8.tar.gz fork-ledger-9b7725ee181617b2e0ea13189837b0724ab964b8.tar.bz2 fork-ledger-9b7725ee181617b2e0ea13189837b0724ab964b8.zip |
Added a simple optimization to the way amount strings are parsed.
Diffstat (limited to 'amount.h')
-rw-r--r-- | amount.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -263,9 +263,10 @@ class amount_t #define AMOUNT_PARSE_NO_MIGRATE 0x01 #define AMOUNT_PARSE_NO_REDUCE 0x02 +#define AMOUNT_PARSE_SOFT_FAIL 0x04 - void parse(std::istream& in, unsigned char flags = 0); - void parse(const std::string& str, unsigned char flags = 0); + bool parse(std::istream& in, unsigned char flags = 0); + bool parse(const std::string& str, unsigned char flags = 0); void reduce(); amount_t reduced() const { |