[SX-book.cpp] convert to c++

pull/1946/head
Christopher Lam 2 years ago
parent 35a0e7774e
commit 5b1bb1186f

@ -141,7 +141,7 @@ set (engine_SOURCES
Recurrence.cpp
Query.cpp
SchedXaction.c
SX-book.c
SX-book.cpp
SX-ttinfo.c
Scrub.cpp
Scrub2.cpp

@ -58,7 +58,7 @@
static Account *
gnc_collection_get_template_root( const QofCollection *col )
{
return qof_collection_get_data (col);
return GNC_ACCOUNT(qof_collection_get_data (col));
}
Account *
@ -141,7 +141,7 @@ sxtg_is_dirty(const QofCollection *col)
descendants = gnc_account_get_descendants(root);
for (node = descendants; node; node = g_list_next(node))
{
if (qof_instance_is_dirty(node->data))
if (qof_instance_is_dirty(QOF_INSTANCE(node->data)))
{
dirty = TRUE;
break;
@ -195,7 +195,7 @@ static QofObject sxtg_object_def =
SchedXactions*
gnc_collection_get_schedxactions(const QofCollection *col)
{
SchedXactions *rtn = qof_collection_get_data(col);
auto rtn = GNC_SCHEDXACTIONS (qof_collection_get_data(col));
// @@assert(rtn != null);
return rtn;
}
@ -260,10 +260,9 @@ static void
book_sxes_setup(QofBook *book)
{
QofCollection *col;
SchedXactions *sxes;
col = qof_book_get_collection(book, GNC_ID_SCHEDXACTION);
sxes = g_object_new (GNC_TYPE_SCHEDXACTIONS, NULL);
auto sxes = GNC_SCHEDXACTIONS (g_object_new (GNC_TYPE_SCHEDXACTIONS, NULL));
g_assert(sxes);
qof_instance_init_data(&sxes->inst, GNC_ID_SXES, book);
sxes->sx_list = NULL;
@ -275,10 +274,9 @@ static void
book_sxes_end(QofBook* book)
{
QofCollection *col;
SchedXactions *sxes;
col = qof_book_get_collection(book, GNC_ID_SCHEDXACTION);
sxes = qof_collection_get_data(col);
auto sxes = GNC_SCHEDXACTIONS (qof_collection_get_data(col));
if (sxes != NULL)
{
g_list_free(sxes->sx_list);

@ -691,7 +691,7 @@ libgnucash/engine/ScrubBudget.c
libgnucash/engine/ScrubBusiness.c
libgnucash/engine/Scrub.cpp
libgnucash/engine/Split.cpp
libgnucash/engine/SX-book.c
libgnucash/engine/SX-book.cpp
libgnucash/engine/SX-ttinfo.c
libgnucash/engine/Transaction.cpp
libgnucash/engine/TransLog.cpp

Loading…
Cancel
Save