diff options
author | John Wiegley <johnw@newartisans.com> | 2020-03-27 18:18:38 -0700 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2020-03-27 18:18:38 -0700 |
commit | a6a58af28f30ee81f86604b56740d98af8b75c38 (patch) | |
tree | 011c166d3e381d82a7ae9515ea67a7860b764aa5 /src/annotate.h | |
parent | bb96e1606444e13dedbd082e74d750ab0e50377d (diff) | |
download | fork-ledger-a6a58af28f30ee81f86604b56740d98af8b75c38.tar.gz fork-ledger-a6a58af28f30ee81f86604b56740d98af8b75c38.tar.bz2 fork-ledger-a6a58af28f30ee81f86604b56740d98af8b75c38.zip |
Compare price annotations using their textual rendering
Diffstat (limited to 'src/annotate.h')
-rw-r--r-- | src/annotate.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/annotate.h b/src/annotate.h index 75d42589..c670f8cc 100644 --- a/src/annotate.h +++ b/src/annotate.h @@ -91,7 +91,9 @@ struct annotation_t : public supports_flags<>, bool operator<(const annotation_t& rhs) const; bool operator==(const annotation_t& rhs) const { - return (price == rhs.price && + return (((! price && ! rhs.price) || + (price && rhs.price && + (*price).to_string() == (*rhs.price).to_string())) && date == rhs.date && tag == rhs.tag && (value_expr && rhs.value_expr ? |