gnucash stable: Amendment last commit, must use std::make_optional

Christopher Lam clam at code.gnucash.org
Fri Aug 18 11:23:02 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/51e932c9 (commit)
	from  https://github.com/Gnucash/gnucash/commit/1e44d1a7 (commit)



commit 51e932c99a98ac8246ba7735a8375db79ff07bc0
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Aug 18 23:21:32 2023 +0800

    Amendment last commit, must use std::make_optional

diff --git a/gnucash/gnome-utils/gnc-tree-container.hpp b/gnucash/gnome-utils/gnc-tree-container.hpp
index fedd6218e9..433833ff10 100644
--- a/gnucash/gnome-utils/gnc-tree-container.hpp
+++ b/gnucash/gnome-utils/gnc-tree-container.hpp
@@ -79,7 +79,7 @@ public:
     GncTreeIter(GtkTreeModel* model) : m_model (model)
     {
         GtkTreeIter iter;
-        m_iter = gtk_tree_model_get_iter_first(m_model, &iter) ? iter : std::nullopt;
+        m_iter = gtk_tree_model_get_iter_first(m_model, &iter) ? std::make_optional(iter) : std::nullopt;
     }
 
     GncTreeIter& operator++()



Summary of changes:
 gnucash/gnome-utils/gnc-tree-container.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



More information about the gnucash-changes mailing list