mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[Scrub3.cpp] convert to cpp
This commit is contained in:
parent
6b5a4d7c11
commit
67d024c11f
@ -144,7 +144,7 @@ set (engine_SOURCES
|
||||
SX-ttinfo.c
|
||||
Scrub.cpp
|
||||
Scrub2.cpp
|
||||
Scrub3.c
|
||||
Scrub3.cpp
|
||||
ScrubBusiness.c
|
||||
ScrubBudget.c
|
||||
Split.cpp
|
||||
|
@ -68,7 +68,7 @@ gains_possible (GNCLot *lot)
|
||||
|
||||
node = gnc_lot_get_split_list (lot);
|
||||
if (!node) return FALSE;
|
||||
split = node->data;
|
||||
split = GNC_SPLIT(node->data);
|
||||
|
||||
acc_commodity = xaccAccountGetCommodity(acc);
|
||||
comeq = gnc_commodity_equiv (acc_commodity, split->parent->common_currency);
|
||||
@ -108,7 +108,7 @@ xaccScrubLot (GNCLot *lot)
|
||||
gnc_numeric opening_baln;
|
||||
|
||||
/* Get the opening balance for this lot */
|
||||
pcy->PolicyGetLotOpening (pcy, lot, &opening_baln, NULL, NULL);
|
||||
pcy->PolicyGetLotOpening (pcy, lot, &opening_baln, nullptr, nullptr);
|
||||
PINFO ("lot opener baln=%s", gnc_num_dbg_to_string (opening_baln));
|
||||
|
||||
/* If the lot is fat, give the boot to all the non-opening
|
||||
@ -121,7 +121,7 @@ xaccScrubLot (GNCLot *lot)
|
||||
rethin:
|
||||
for (node = gnc_lot_get_split_list(lot); node; node = node->next)
|
||||
{
|
||||
Split *s = node->data;
|
||||
Split *s = GNC_SPLIT(node->data);
|
||||
if (pcy->PolicyIsOpeningSplit (pcy, lot, s)) continue;
|
||||
gnc_lot_remove_split (lot, s);
|
||||
goto rethin;
|
||||
@ -144,7 +144,7 @@ rethin:
|
||||
*/
|
||||
if (gains_possible (lot))
|
||||
{
|
||||
xaccLotComputeCapGains (lot, NULL);
|
||||
xaccLotComputeCapGains (lot, nullptr);
|
||||
xaccLotScrubDoubleBalance (lot);
|
||||
}
|
||||
xaccAccountCommitEdit(acc);
|
||||
@ -169,7 +169,7 @@ xaccAccountScrubLots (Account *acc)
|
||||
lots = xaccAccountGetLotList(acc);
|
||||
for (node = lots; node; node = node->next)
|
||||
{
|
||||
GNCLot *lot = node->data;
|
||||
GNCLot *lot = GNC_LOT(node->data);
|
||||
xaccScrubLot (lot);
|
||||
}
|
||||
g_list_free(lots);
|
||||
@ -191,7 +191,7 @@ xaccAccountTreeScrubLots (Account *acc)
|
||||
{
|
||||
if (!acc) return;
|
||||
|
||||
gnc_account_foreach_descendant(acc, lot_scrub_cb, NULL);
|
||||
gnc_account_foreach_descendant(acc, lot_scrub_cb, nullptr);
|
||||
xaccAccountScrubLots (acc);
|
||||
}
|
||||
|
@ -687,7 +687,7 @@ libgnucash/engine/Query.c
|
||||
libgnucash/engine/Recurrence.cpp
|
||||
libgnucash/engine/SchedXaction.c
|
||||
libgnucash/engine/Scrub2.cpp
|
||||
libgnucash/engine/Scrub3.c
|
||||
libgnucash/engine/Scrub3.cpp
|
||||
libgnucash/engine/ScrubBudget.c
|
||||
libgnucash/engine/ScrubBusiness.c
|
||||
libgnucash/engine/Scrub.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user