mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[assistant-stock-transaction.cpp] don't copy SplitsVec
This commit is contained in:
parent
cd097d19ec
commit
f19e462098
@ -1263,7 +1263,7 @@ StockAssistantModel::set_txn_type (guint type_idx)
|
||||
};
|
||||
|
||||
static void
|
||||
check_txn_date(Split* last_split, time64 txn_date, Logger& logger)
|
||||
check_txn_date(const Split* last_split, time64 txn_date, Logger& logger)
|
||||
{
|
||||
auto last_split_date = xaccTransGetDate(xaccSplitGetParent(last_split));
|
||||
if (txn_date <= last_split_date) {
|
||||
@ -1301,8 +1301,7 @@ StockAssistantModel::generate_list_of_splits() {
|
||||
// transactions dated after the date specified, it is very likely
|
||||
// the later stock transactions will be invalidated. warn the user
|
||||
// to review them.
|
||||
auto splits{xaccAccountGetSplits (m_acct)};
|
||||
if (!splits.empty())
|
||||
if (const auto& splits = xaccAccountGetSplits (m_acct); !splits.empty())
|
||||
check_txn_date(splits.back(), m_transaction_date, m_logger);
|
||||
|
||||
if (m_stock_entry->enabled() || m_stock_entry->has_amount())
|
||||
|
Loading…
Reference in New Issue
Block a user