summaryrefslogtreecommitdiff
path: root/src/format.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-05 05:02:11 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-05 05:03:53 -0600
commit5abbf445833f985f2aa22bde57d47cd9f83d0c92 (patch)
tree083f3520a68edd1ec7445bd74dc16f42aa1eef9c /src/format.h
parent3ea5d88eb3ddfd8cac248fe96fdaa293e3b5bf70 (diff)
downloadfork-ledger-5abbf445833f985f2aa22bde57d47cd9f83d0c92.tar.gz
fork-ledger-5abbf445833f985f2aa22bde57d47cd9f83d0c92.tar.bz2
fork-ledger-5abbf445833f985f2aa22bde57d47cd9f83d0c92.zip
Corrected copy of format_t objects
Copying of sub-elements was causing pointer overlap.
Diffstat (limited to 'src/format.h')
-rw-r--r--src/format.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/format.h b/src/format.h
index 74d77768..0073b427 100644
--- a/src/format.h
+++ b/src/format.h
@@ -71,12 +71,11 @@ class format_t : public expr_base_t<string>
: supports_flags<>(), type(STRING), min_width(0), max_width(0) {
TRACE_CTOR(element_t, "");
}
+ element_t(const element_t& elem);
+
~element_t() throw() {
TRACE_DTOR(element_t);
}
- element_t(const element_t& elem) : supports_flags<>() {
- *this = elem;
- }
element_t& operator=(const element_t& elem) {
if (this != &elem) {