Commit Graph

9 Commits

Author SHA1 Message Date
Christopher Lam
1a7fcb69c0 [gnc-features.cpp] remove_if requires <algorithm> 2023-04-29 08:17:22 +08:00
John Ralls
8481f062d4 Create obsolete features list with first member book_currency.
Obsolete features set in the book will be removed from the book's
KVP and ignored. Note the warning in the comment!
2023-04-28 17:08:04 -07:00
John Ralls
0d175dce12 Refactor gnc-features.
* type aliases to gnc-features.h
* string_views to avoid copying (all of the strings are static)
* qof_book_get_unknown_features returns a FeatureSet
2023-04-28 16:31:07 -07:00
John Ralls
e8c80f2f5c Restore existence, but not implementation, of GNC_FEATURE_BOOK_CURRENCY.
At least one user has managed to get it set on their book so even
though it was supposed to be unimplemented it got through somehow.
Restoring it allows books with it set to load.
2023-04-28 14:15:59 -07:00
Richard Cohen
6ba5bb326a Fix dereference of expired temporaries.
Reported by clang 15.0.7, which will be in Ubuntu 23.04, -Wdangling-gsl
2023-03-31 11:27:33 -07:00
Richard Cohen
1cec0cb3f3 Use internal extern "C" { ... } for C++
- removes warnings compiling swig engine
...
[ 10%] Generating swig-engine.cpp
.../libgnucash/engine/engine-helpers.h:31: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gnc-date.h:83: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/qofquery.h:90: Warning 302: Identifier 'QofQuery' redefined (ignored),
.../libgnucash/engine/gnc-option.hpp:55: Warning 302: previous definition of 'QofQuery'.
.../libgnucash/engine/gnc-commodity.h:56: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncBusiness.h:40: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncEntry.h:37: Warning 313: Unrecognized extern type "C++".
2023-01-23 18:40:01 +00:00
Christopher Lam
fc94b41c81 Merge branch 'maint' 2022-10-29 21:53:57 +08:00
Christopher Lam
1516bb18b0 [gnc-features.cpp] backport gnc_features_set_unused from master 2022-10-29 21:01:01 +08:00
Christopher Lam
8192deff37 [gnc-features.cpp] convert to cpp
- don't need to create/destroy GHashTable for each feature query
- plugs leak: g_hash_table_unref (features_used) not always called properly
- to check 1 feature, don't need to traverse whole GHashTable
2022-10-28 20:50:35 +08:00