Browse Source

write on exitr

master
Jørgen Sverre Lien Sellæg 5 years ago
parent
commit
e7c96aeb75
  1. 3
      include/orders.hpp
  2. 2
      src/orders.cpp

3
include/orders.hpp

@ -8,9 +8,10 @@ class orders : public json {
const with_data_directory &data_directory; const with_data_directory &data_directory;
const fs::path &get_path(); const fs::path &get_path();
public: public:
void write(); void write();
void load(); void load();
orders(const with_data_directory &); orders(const with_data_directory &);
void push();
~orders();
}; };

2
src/orders.cpp

@ -36,3 +36,5 @@ void orders::write() {
std::cerr << e.what() << std::endl; std::cerr << e.what() << std::endl;
} }
} }
orders::~orders() { write(); }
Loading…
Cancel
Save