gnucash maint: Drop useless ifdefs
Geert Janssens
gjanssens at code.gnucash.org
Fri Jan 17 12:25:51 EST 2020
Updated via https://github.com/Gnucash/gnucash/commit/073e4780 (commit)
from https://github.com/Gnucash/gnucash/commit/d8a304c2 (commit)
commit 073e47801d5da1f9448e575fcae4dee071899a76
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Jan 17 18:25:43 2020 +0100
Drop useless ifdefs
The parameter it checks is always defined these days
diff --git a/libgnucash/backend/xml/sixtp-utils.cpp b/libgnucash/backend/xml/sixtp-utils.cpp
index a1527f3bc..1df133825 100644
--- a/libgnucash/backend/xml/sixtp-utils.cpp
+++ b/libgnucash/backend/xml/sixtp-utils.cpp
@@ -36,12 +36,10 @@ extern "C"
#include <time.h>
#include <errno.h>
-#ifdef PROJECT_VERSION_MAJOR
#ifndef HAVE_STRPTIME
#include "strptime.h"
#endif
#include <gnc-date.h>
-#endif
}
#include "sixtp.h"
diff --git a/libgnucash/engine/gncAddress.h b/libgnucash/engine/gncAddress.h
index e5c16a914..1473130ce 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 5554db364..724679cc7 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 3b5b1df31..b7c547d94 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 6cce6aef9..d1d850fea 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 d7a966c86..9433c742e 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);
}
Summary of changes:
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(-)
More information about the gnucash-changes
mailing list