aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/history/Bookmark.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-12-13 21:09:27 +0100
committer GitHub <noreply@github.com>2023-12-13 21:09:27 +0100
commite79ad08e28c07bac5d28d0653cbe374cd51e6bbe (patch)
tree4dbbbc2c10b8bbc6670b36f3d4ecd4d5f7e765f9 /src/openvic-simulation/history/Bookmark.cpp
parentce45aaae79199e07f9249799884cbba1b3d581eb (diff)
parent89c93f98b865c20cd3c3486a9b91323565e759fc (diff)
Merge pull request #89 from OpenVicProject/dataloading-pop-history
Pop History Loading (with the new system)
Diffstat (limited to 'src/openvic-simulation/history/Bookmark.cpp')
-rw-r--r--src/openvic-simulation/history/Bookmark.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/openvic-simulation/history/Bookmark.cpp b/src/openvic-simulation/history/Bookmark.cpp
index 2927950..b758867 100644
--- a/src/openvic-simulation/history/Bookmark.cpp
+++ b/src/openvic-simulation/history/Bookmark.cpp
@@ -48,3 +48,13 @@ bool BookmarkManager::load_bookmark_file(ast::NodeCPtr root) {
return ret;
}
+
+Date BookmarkManager::get_last_bookmark_date() const {
+ Date ret {};
+ for (Bookmark const& bookmark : get_bookmarks()) {
+ if (bookmark.get_date() > ret) {
+ ret = bookmark.get_date();
+ }
+ }
+ return ret;
+}