From e7c96aeb757617ff6ea7db568393b6b5b680aaa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Sverre=20Lien=20Sell=C3=A6g?= Date: Sun, 23 May 2021 19:02:36 +0200 Subject: [PATCH] write on exitr --- include/orders.hpp | 3 ++- src/orders.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/orders.hpp b/include/orders.hpp index f45ccb9..3913f46 100644 --- a/include/orders.hpp +++ b/include/orders.hpp @@ -8,9 +8,10 @@ class orders : public json { const with_data_directory &data_directory; const fs::path &get_path(); - public: void write(); void load(); orders(const with_data_directory &); + void push(); + ~orders(); }; diff --git a/src/orders.cpp b/src/orders.cpp index fa96382..13d84d0 100644 --- a/src/orders.cpp +++ b/src/orders.cpp @@ -35,4 +35,6 @@ void orders::write() { } catch (const std::exception &e) { std::cerr << e.what() << std::endl; } -} \ No newline at end of file +} + +orders::~orders() { write(); } \ No newline at end of file