diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-01 06:01:21 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-01 06:01:21 -0500 |
commit | 977e7db164cfe8572a5e0080746c34f5a7b1729e (patch) | |
tree | 90b8da365c8b9481293e8087ad934c71ec7ce565 /src/archive.h | |
parent | de3893a08a9d85e672a09f21f20bc3148a4933b8 (diff) | |
download | fork-ledger-977e7db164cfe8572a5e0080746c34f5a7b1729e.tar.gz fork-ledger-977e7db164cfe8572a5e0080746c34f5a7b1729e.tar.bz2 fork-ledger-977e7db164cfe8572a5e0080746c34f5a7b1729e.zip |
Improved archive header logic for cache files
Diffstat (limited to 'src/archive.h')
-rw-r--r-- | src/archive.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/archive.h b/src/archive.h index 77272dbe..cd778a03 100644 --- a/src/archive.h +++ b/src/archive.h @@ -58,7 +58,6 @@ namespace ledger { class archive_t { path file; - uint32_t version; std::list<journal_t::fileinfo_t> sources; @@ -66,19 +65,17 @@ public: archive_t() { TRACE_CTOR(archive_t, ""); } - archive_t(const path& _file) - : file(_file), version(0) { + archive_t(const path& _file) : file(_file) { TRACE_CTOR(archive_t, "const path&"); } - archive_t(const archive_t& ar) - : file(ar.file), version(0) { + archive_t(const archive_t& ar) : file(ar.file) { TRACE_CTOR(archive_t, "copy"); } ~archive_t() { TRACE_DTOR(archive_t); } - void read_header(); + bool read_header(); bool should_load(const std::list<path>& data_files); bool should_save(shared_ptr<journal_t> journal); @@ -94,7 +91,6 @@ private: template<class Archive> void serialize(Archive & ar, const unsigned int /* version */) { - ar & version; ar & sources; } #endif // HAVE_BOOST_SERIALIZATION |