From 073e47801d5da1f9448e575fcae4dee071899a76 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Fri, 17 Jan 2020 18:25:43 +0100 Subject: [PATCH] Drop useless ifdefs The parameter it checks is always defined these days --- libgnucash/backend/xml/sixtp-utils.cpp | 2 -- libgnucash/engine/gncAddress.h | 2 -- libgnucash/engine/gncBillTerm.h | 3 +-- libgnucash/engine/gncCustomer.c | 2 -- libgnucash/engine/gncEntry.h | 2 -- libgnucash/engine/gncJob.c | 6 ------ 6 files changed, 1 insertion(+), 16 deletions(-) diff --git a/libgnucash/backend/xml/sixtp-utils.cpp b/libgnucash/backend/xml/sixtp-utils.cpp index a1527f3bca..1df1338251 100644 --- a/libgnucash/backend/xml/sixtp-utils.cpp +++ b/libgnucash/backend/xml/sixtp-utils.cpp @@ -36,12 +36,10 @@ extern "C" #include #include -#ifdef PROJECT_VERSION_MAJOR #ifndef HAVE_STRPTIME #include "strptime.h" #endif #include -#endif } #include "sixtp.h" diff --git a/libgnucash/engine/gncAddress.h b/libgnucash/engine/gncAddress.h index e5c16a914d..1473130ce5 100644 --- a/libgnucash/engine/gncAddress.h +++ b/libgnucash/engine/gncAddress.h @@ -55,9 +55,7 @@ up to you to pass a suitable entity. #define GNC_ADDRESS_H_ #include "qof.h" -#ifdef PROJECT_VERSION_MAJOR #include "gncBusiness.h" -#endif #define GNC_ADDRESS_MODULE_NAME "gncAddress" #define GNC_ID_ADDRESS GNC_ADDRESS_MODULE_NAME diff --git a/libgnucash/engine/gncBillTerm.h b/libgnucash/engine/gncBillTerm.h index 5554db364e..724679cc75 100644 --- a/libgnucash/engine/gncBillTerm.h +++ b/libgnucash/engine/gncBillTerm.h @@ -35,9 +35,8 @@ typedef struct _gncBillTerm GncBillTerm; typedef struct _gncBillTermClass GncBillTermClass; #include "qof.h" -#ifdef PROJECT_VERSION_MAJOR #include "gncBusiness.h" -#endif + #define GNC_ID_BILLTERM "gncBillTerm" /* --- type macros --- */ diff --git a/libgnucash/engine/gncCustomer.c b/libgnucash/engine/gncCustomer.c index 3b5b1df314..b7c547d940 100644 --- a/libgnucash/engine/gncCustomer.c +++ b/libgnucash/engine/gncCustomer.c @@ -37,9 +37,7 @@ #include "gncAddressP.h" #include "gncBillTermP.h" #include "gncInvoice.h" -#ifdef PROJECT_VERSION_MAJOR #include "gncBusiness.h" -#endif #include "gncCustomer.h" #include "gncCustomerP.h" diff --git a/libgnucash/engine/gncEntry.h b/libgnucash/engine/gncEntry.h index 6cce6aef91..d1d850fea4 100644 --- a/libgnucash/engine/gncEntry.h +++ b/libgnucash/engine/gncEntry.h @@ -49,9 +49,7 @@ typedef enum typedef GList AccountValueList; -#ifdef PROJECT_VERSION_MAJOR #include "gncBusiness.h" -#endif #include "gncInvoice.h" #include "gncOrder.h" #include "gncTaxTable.h" diff --git a/libgnucash/engine/gncJob.c b/libgnucash/engine/gncJob.c index d7a966c86b..9433c742e4 100644 --- a/libgnucash/engine/gncJob.c +++ b/libgnucash/engine/gncJob.c @@ -576,11 +576,7 @@ gboolean gncJobRegister (void) { JOB_ACTIVE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncJobGetActive, (QofSetterFunc)gncJobSetActive }, { JOB_REFERENCE, QOF_TYPE_STRING, (QofAccessFunc)gncJobGetReference, (QofSetterFunc)gncJobSetReference }, { JOB_RATE, QOF_TYPE_NUMERIC, (QofAccessFunc)gncJobGetRate, (QofSetterFunc)gncJobSetRate }, -#ifdef PROJECT_VERSION_MAJOR { JOB_OWNER, GNC_ID_OWNER, (QofAccessFunc)gncJobGetOwner, NULL }, -#else - { JOB_OWNER, QOF_TYPE_CHOICE, (QofAccessFunc)qofJobGetOwner, (QofSetterFunc)qofJobSetOwner }, -#endif { QOF_PARAM_ACTIVE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncJobGetActive, NULL }, { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL }, { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL }, @@ -597,10 +593,8 @@ gboolean gncJobRegister (void) } qof_class_register (_GNC_MOD_NAME, (QofSortFunc)gncJobCompare, params); -#ifdef PROJECT_VERSION_MAJOR qofJobGetOwner(NULL); qofJobSetOwner(NULL, NULL); -#endif return qof_object_register (&gncJobDesc); }