From 4481692037aba4ef3af1f69c43a8e1b4e1f531f3 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Thu, 5 May 2016 15:09:31 -0700 Subject: lint: low hanging fruit in history.cpp --- src/history.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/history.h') diff --git a/src/history.h b/src/history.h index 0aa09b7c..114df957 100644 --- a/src/history.h +++ b/src/history.h @@ -52,9 +52,6 @@ class history_item_t { friend class history_tests_t; private: - explicit history_item_t(const wcstring &str); - explicit history_item_t(const wcstring &, time_t, history_identifier_t ident = 0); - // Attempts to merge two compatible history items together. bool merge(const history_item_t &item); @@ -71,6 +68,9 @@ class history_item_t { path_list_t required_paths; public: + explicit history_item_t(const wcstring &str); + explicit history_item_t(const wcstring &, time_t, history_identifier_t ident = 0); + const wcstring &str() const { return contents; } bool empty() const { return contents.empty(); } @@ -81,6 +81,7 @@ class history_item_t { time_t timestamp() const { return creation_timestamp; } const path_list_t &get_required_paths() const { return required_paths; } + void set_required_paths(path_list_t paths) { required_paths = paths; } bool operator==(const history_item_t &other) const { return contents == other.contents && creation_timestamp == other.creation_timestamp && @@ -191,11 +192,6 @@ class history_t { // Whether we're in maximum chaos mode, useful for testing. bool chaos_mode; - // Versioned decoding. - static history_item_t decode_item_fish_2_0(const char *base, size_t len); - static history_item_t decode_item_fish_1_x(const char *base, size_t len); - static history_item_t decode_item(const char *base, size_t len, history_file_type_t type); - public: explicit history_t(const wcstring &); // constructor ~history_t(); // desctructor -- cgit v1.2.3