diff options
Diffstat (limited to 'src/openvic-simulation/history/Bookmark.cpp')
-rw-r--r-- | src/openvic-simulation/history/Bookmark.cpp | 10 |
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; +} |