Changed iterators from iter++ to ++iter

Large set of changes to history to ensure that histories from other sessions don't "bleed" into the current session
This commit is contained in:
ridiculousfish
2012-03-01 14:56:34 -08:00
parent 5d18d60e3b
commit fd4df6f9bb
11 changed files with 171 additions and 48 deletions

View File

@@ -34,10 +34,13 @@ class history_item_t {
private:
explicit history_item_t(const wcstring &);
explicit history_item_t(const wcstring &, time_t, const path_list_t &paths = path_list_t());
/** Attempts to merge two compatible history items together */
bool merge(const history_item_t &item);
/** The actual contents of the entry */
wcstring contents;
/** Original creation time for the entry */
time_t creation_timestamp;
@@ -101,9 +104,10 @@ class history_t {
/** The size of the mmaped region */
size_t mmap_length;
/**
Timestamp of last save
*/
/** Timestamp of when this history was created */
const time_t birth_timestamp;
/** Timestamp of last save */
time_t save_timestamp;
static history_item_t decode_item(const char *ptr, size_t len);
@@ -119,6 +123,9 @@ class history_t {
/** Loads old if necessary */
void load_old_if_needed(void);
/** Deletes duplicates in new_items. */
void compact_new_items();
/** Saves history */
void save_internal();