Skip to content

Commit e48e6e2

Browse files
[import-commodity-matcher.cpp] convert to cpp
1 parent f1c70a0 commit e48e6e2

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

gnucash/import-export/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ add_subdirectory(qif-imp)
1515

1616
set (generic_import_SOURCES
1717
import-account-matcher.c
18-
import-commodity-matcher.c
18+
import-commodity-matcher.cpp
1919
import-backend.cpp
2020
import-format-dialog.c
2121
import-match-picker.cpp

gnucash/import-export/import-commodity-matcher.c renamed to gnucash/import-export/import-commodity-matcher.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ gnc_commodity * gnc_import_select_commodity(const char * cusip,
6868

6969
for (GList *n = namespace_list; !retval && n; n = g_list_next (n))
7070
{
71-
const char *ns = n->data;
71+
auto ns = static_cast<const char*>(n->data);
7272
DEBUG("Looking at namespace %s", ns);
7373
GList *comm_list = gnc_commodity_table_get_commodities (commodity_table, ns);
7474
for (GList *m = comm_list; !retval && m; m = g_list_next (m))
7575
{
76-
gnc_commodity *com = m->data;
76+
auto com = static_cast<gnc_commodity*>(m->data);
7777
DEBUG("Looking at commodity %s", gnc_commodity_get_fullname (com));
7878
if (!g_strcmp0 (gnc_commodity_get_cusip (com), cusip))
7979
{

gnucash/import-export/import-commodity-matcher.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
#ifndef IMPORT_COMMODITY_MATCHER_H
2626
#define IMPORT_COMMODITY_MATCHER_H
2727

28+
#ifdef __cplusplus
29+
extern "C" {
30+
#endif
31+
2832
#include "gnc-commodity.h"
2933

3034
/**
@@ -63,5 +67,10 @@ gnc_commodity * gnc_import_select_commodity(const char * cusip,
6367
const char * default_fullname,
6468
const char * default_mnemonic);
6569

70+
71+
#ifdef __cplusplus
72+
}
73+
#endif
74+
6675
#endif
6776
/**@}*/

po/POTFILES.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ gnucash/import-export/customer-import/dialog-customer-import-gui.c
348348
gnucash/import-export/customer-import/gnc-plugin-customer-import.c
349349
gnucash/import-export/import-account-matcher.c
350350
gnucash/import-export/import-backend.cpp
351-
gnucash/import-export/import-commodity-matcher.c
351+
gnucash/import-export/import-commodity-matcher.cpp
352352
gnucash/import-export/import-format-dialog.c
353353
gnucash/import-export/import-main-matcher.cpp
354354
gnucash/import-export/import-match-picker.cpp

0 commit comments

Comments
 (0)