summaryrefslogtreecommitdiff
path: root/amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2003-10-02 00:07:14 +0000
committerJohn Wiegley <johnw@newartisans.com>2003-10-02 00:07:14 +0000
commit2a1055890241b1299d8b91d65038d0f4f5067fb5 (patch)
tree97616b59a3139a591458e4ac95580fa6937c39b4 /amount.cc
parent3afa81857a688cb2eca56945dc5c40b9825b2e69 (diff)
downloadfork-ledger-2a1055890241b1299d8b91d65038d0f4f5067fb5.tar.gz
fork-ledger-2a1055890241b1299d8b91d65038d0f4f5067fb5.tar.bz2
fork-ledger-2a1055890241b1299d8b91d65038d0f4f5067fb5.zip
*** empty log message ***
Diffstat (limited to 'amount.cc')
-rw-r--r--amount.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/amount.cc b/amount.cc
index 695c4226..6098ebde 100644
--- a/amount.cc
+++ b/amount.cc
@@ -64,14 +64,8 @@ class gmp_amount : public amount
}
virtual void credit(const amount * other);
- virtual void parse(const char * num) {
- *this = num;
- }
- virtual amount& operator=(const char * num);
+ virtual void parse(const char * num);
virtual std::string as_str(bool full_prec) const;
- virtual operator std::string() const {
- return as_str(false);
- }
friend amount * create_amount(const char * value, const amount * cost);
};
@@ -565,7 +559,7 @@ static commodity * parse_amount(mpz_t out, const char * num,
return comm;
}
-amount& gmp_amount::operator=(const char * num)
+void gmp_amount::parse(const char * num)
{
// Compile the regular expression used for parsing amounts
static pcre * re = NULL;
@@ -594,7 +588,6 @@ amount& gmp_amount::operator=(const char * num)
} else {
std::cerr << "Failed to parse amount: " << num << std::endl;
}
- return *this;
}
void gmp_amount::credit(const amount * value)