mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-10-25 07:37:39 -05:00
[gnc-commodity.cpp] gnc_quote_source_num_entries speedup
previously was allocating a vector copy, and measuring the distance manually. return std::list size() which is maintained internally.
This commit is contained in:
1 parent
368b2894b5
commit
54693abe30
1 file changed
+1
-2
@@ -301,8 +301,7 @@ get_quote_source_from_type (QuoteSourceType type)
|
||||
********************************************************************/
|
||||
gint gnc_quote_source_num_entries(QuoteSourceType type)
|
||||
{
|
||||
auto source{get_quote_source_from_type(type)};
|
||||
return std::distance(source.begin(), source.end());
|
||||
return get_quote_source_from_type(type).size();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user