From d100df7ef755f76bc9da5a7c67fc1c2f864e2bbc Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Mon, 18 Mar 2024 10:08:42 +0800 Subject: [PATCH] [AccountP.hpp] .h -> .hpp, remove extern "C" {} wrapper --- libgnucash/backend/sql/gnc-account-sql.cpp | 2 +- libgnucash/backend/xml/gnc-account-xml-v2.cpp | 2 +- libgnucash/backend/xml/gnc-commodity-xml-v2.cpp | 2 +- libgnucash/backend/xml/gnc-transaction-xml-v2.cpp | 2 +- libgnucash/backend/xml/io-gncxml-v1.cpp | 2 +- libgnucash/backend/xml/test/test-xml-transaction.cpp | 2 +- libgnucash/engine/Account.cpp | 2 +- libgnucash/engine/{AccountP.h => AccountP.hpp} | 12 ++---------- libgnucash/engine/CMakeLists.txt | 2 +- libgnucash/engine/Scrub.cpp | 2 +- libgnucash/engine/Scrub2.cpp | 2 +- libgnucash/engine/Scrub3.cpp | 2 +- libgnucash/engine/Split.cpp | 2 +- libgnucash/engine/Transaction.cpp | 2 +- libgnucash/engine/cap-gains.cpp | 2 +- libgnucash/engine/cashobjects.cpp | 2 +- libgnucash/engine/gnc-engine.cpp | 2 +- libgnucash/engine/gnc-engine.h | 2 +- libgnucash/engine/gnc-lot.cpp | 2 +- libgnucash/engine/mocks/gmock-Account.h | 2 +- libgnucash/engine/qofbook.cpp | 2 +- libgnucash/engine/test-core/test-engine-stuff.cpp | 2 +- libgnucash/engine/test/test-split-vs-account.cpp | 2 +- libgnucash/engine/test/utest-Account.cpp | 2 +- 24 files changed, 25 insertions(+), 33 deletions(-) rename libgnucash/engine/{AccountP.h => AccountP.hpp} (97%) diff --git a/libgnucash/backend/sql/gnc-account-sql.cpp b/libgnucash/backend/sql/gnc-account-sql.cpp index 2552ed3bc0..fb62a520f8 100644 --- a/libgnucash/backend/sql/gnc-account-sql.cpp +++ b/libgnucash/backend/sql/gnc-account-sql.cpp @@ -32,7 +32,7 @@ #include "qof.h" #include "Account.h" -#include "AccountP.h" +#include "AccountP.hpp" #include "gnc-commodity.h" #if defined( S_SPLINT_S ) diff --git a/libgnucash/backend/xml/gnc-account-xml-v2.cpp b/libgnucash/backend/xml/gnc-account-xml-v2.cpp index 126c591f7c..6e7ce57e8a 100644 --- a/libgnucash/backend/xml/gnc-account-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-account-xml-v2.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include "gnc-xml-helper.h" diff --git a/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp b/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp index f943965a7f..de5c5ca896 100644 --- a/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp @@ -25,7 +25,7 @@ #include #include -#include "AccountP.h" +#include "AccountP.hpp" #include "Account.h" #include "gnc-xml-helper.h" diff --git a/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp b/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp index c954138347..ecf3e40cbe 100644 --- a/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp @@ -25,7 +25,7 @@ #include #include -#include "AccountP.h" +#include "AccountP.hpp" #include "Transaction.h" #include "TransactionP.h" #include "gnc-lot.h" diff --git a/libgnucash/backend/xml/io-gncxml-v1.cpp b/libgnucash/backend/xml/io-gncxml-v1.cpp index d7aecc4b18..789a72ff7a 100644 --- a/libgnucash/backend/xml/io-gncxml-v1.cpp +++ b/libgnucash/backend/xml/io-gncxml-v1.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include #include diff --git a/libgnucash/backend/xml/test/test-xml-transaction.cpp b/libgnucash/backend/xml/test/test-xml-transaction.cpp index 46e7104efe..39470ddbeb 100644 --- a/libgnucash/backend/xml/test/test-xml-transaction.cpp +++ b/libgnucash/backend/xml/test/test-xml-transaction.cpp @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/libgnucash/engine/Account.cpp b/libgnucash/engine/Account.cpp index be3b56ab59..b54544a413 100644 --- a/libgnucash/engine/Account.cpp +++ b/libgnucash/engine/Account.cpp @@ -33,7 +33,7 @@ #include #include -#include "AccountP.h" +#include "AccountP.hpp" #include "Split.h" #include "Transaction.h" #include "TransactionP.h" diff --git a/libgnucash/engine/AccountP.h b/libgnucash/engine/AccountP.hpp similarity index 97% rename from libgnucash/engine/AccountP.h rename to libgnucash/engine/AccountP.hpp index 39a5b55de0..0e5618806d 100644 --- a/libgnucash/engine/AccountP.h +++ b/libgnucash/engine/AccountP.hpp @@ -1,5 +1,5 @@ /********************************************************************\ - * AccountP.h -- Account engine-private data structure * + * AccountP.hpp -- Account engine-private data structure * * Copyright (C) 1997 Robin D. Clark * * Copyright (C) 1997-2002, Linas Vepstas * * * @@ -22,7 +22,7 @@ * * \********************************************************************/ -/** @file AccountP.h +/** @file AccountP.hpp * * This is the *private* header for the account structure. * No one outside of the engine should ever include this file. @@ -41,10 +41,6 @@ #include "Account.h" -#ifdef __cplusplus -extern "C" { -#endif - #define GNC_ID_ROOT_ACCOUNT "RootAccount" /** STRUCTS *********************************************************/ @@ -177,8 +173,4 @@ typedef struct AccountTestFunctions* _utest_account_fill_functions(void); -#ifdef __cplusplus -} /* extern "C" */ -#endif - #endif /* XACC_ACCOUNT_P_H */ diff --git a/libgnucash/engine/CMakeLists.txt b/libgnucash/engine/CMakeLists.txt index 05e63ccfc1..84178c99ca 100644 --- a/libgnucash/engine/CMakeLists.txt +++ b/libgnucash/engine/CMakeLists.txt @@ -5,7 +5,7 @@ add_subdirectory(test) add_subdirectory(mocks) set(engine_noinst_HEADERS - AccountP.h + AccountP.hpp SplitP.h SX-book.h SX-ttinfo.h diff --git a/libgnucash/engine/Scrub.cpp b/libgnucash/engine/Scrub.cpp index 774b6a9686..0530325dfc 100644 --- a/libgnucash/engine/Scrub.cpp +++ b/libgnucash/engine/Scrub.cpp @@ -46,7 +46,7 @@ #include #include "Account.h" -#include "AccountP.h" +#include "AccountP.hpp" #include "Scrub.h" #include "Transaction.h" #include "TransactionP.h" diff --git a/libgnucash/engine/Scrub2.cpp b/libgnucash/engine/Scrub2.cpp index 5d607aad30..6743895177 100644 --- a/libgnucash/engine/Scrub2.cpp +++ b/libgnucash/engine/Scrub2.cpp @@ -36,7 +36,7 @@ #include "qof.h" #include "Account.h" -#include "AccountP.h" +#include "AccountP.hpp" #include "Transaction.h" #include "TransactionP.h" #include "Scrub2.h" diff --git a/libgnucash/engine/Scrub3.cpp b/libgnucash/engine/Scrub3.cpp index 3eeca2ff43..69bda2edc3 100644 --- a/libgnucash/engine/Scrub3.cpp +++ b/libgnucash/engine/Scrub3.cpp @@ -39,7 +39,7 @@ #include "gnc-lot.h" #include "policy-p.h" #include "Account.h" -#include "AccountP.h" +#include "AccountP.hpp" #include "Scrub2.h" #include "Scrub3.h" #include "Transaction.h" diff --git a/libgnucash/engine/Split.cpp b/libgnucash/engine/Split.cpp index f8cec19a0e..85fa02fa52 100644 --- a/libgnucash/engine/Split.cpp +++ b/libgnucash/engine/Split.cpp @@ -47,7 +47,7 @@ #include "qof.h" #include "qofbook.h" #include "Split.h" -#include "AccountP.h" +#include "AccountP.hpp" #include "Scrub.h" #include "TransactionP.h" #include "TransLog.h" diff --git a/libgnucash/engine/Transaction.cpp b/libgnucash/engine/Transaction.cpp index 84f36add04..bc17b5d18e 100644 --- a/libgnucash/engine/Transaction.cpp +++ b/libgnucash/engine/Transaction.cpp @@ -42,7 +42,7 @@ # include #endif -#include "AccountP.h" +#include "AccountP.hpp" #include "Scrub.h" #include "Scrub3.h" #include "TransactionP.h" diff --git a/libgnucash/engine/cap-gains.cpp b/libgnucash/engine/cap-gains.cpp index 8139fd4cc7..0754005fc7 100644 --- a/libgnucash/engine/cap-gains.cpp +++ b/libgnucash/engine/cap-gains.cpp @@ -58,7 +58,7 @@ ToDo: #include #include -#include "AccountP.h" +#include "AccountP.hpp" #include "Scrub2.h" #include "Scrub3.h" #include "Transaction.h" diff --git a/libgnucash/engine/cashobjects.cpp b/libgnucash/engine/cashobjects.cpp index e2f34d8d5e..ef6d0edd0b 100644 --- a/libgnucash/engine/cashobjects.cpp +++ b/libgnucash/engine/cashobjects.cpp @@ -29,7 +29,7 @@ #include #include "cashobjects.h" #include "gnc-engine.h" -#include "AccountP.h" +#include "AccountP.hpp" #include "TransactionP.h" #include "SchedXaction.h" #include "SX-book-p.h" diff --git a/libgnucash/engine/gnc-engine.cpp b/libgnucash/engine/gnc-engine.cpp index f472dc5e92..b912ea063b 100644 --- a/libgnucash/engine/gnc-engine.cpp +++ b/libgnucash/engine/gnc-engine.cpp @@ -27,7 +27,7 @@ #include "gnc-engine.h" #include "qof.h" #include "cashobjects.h" -#include "AccountP.h" +#include "AccountP.hpp" #include "SX-book-p.h" #include "gnc-budget.h" #include "TransactionP.h" diff --git a/libgnucash/engine/gnc-engine.h b/libgnucash/engine/gnc-engine.h index 9a981c8e52..1f911f9405 100644 --- a/libgnucash/engine/gnc-engine.h +++ b/libgnucash/engine/gnc-engine.h @@ -130,7 +130,7 @@ extern "C" { /** @brief Account in Gnucash. * This is the typename for an account. The actual structure is - * defined in the private header AccountP.h, but no one outside the + * defined in the private header AccountP.hpp, but no one outside the * engine should include that file. Instead, access that data only * through the functions in Account.h .*/ typedef struct account_s Account; diff --git a/libgnucash/engine/gnc-lot.cpp b/libgnucash/engine/gnc-lot.cpp index 84f47f1dfd..8e6cb5ad45 100644 --- a/libgnucash/engine/gnc-lot.cpp +++ b/libgnucash/engine/gnc-lot.cpp @@ -46,7 +46,7 @@ #include #include "Account.h" -#include "AccountP.h" +#include "AccountP.hpp" #include "gnc-lot.h" #include "gnc-lot-p.h" #include "cap-gains.h" diff --git a/libgnucash/engine/mocks/gmock-Account.h b/libgnucash/engine/mocks/gmock-Account.h index 0fd23ff907..fc71b0f8f7 100644 --- a/libgnucash/engine/mocks/gmock-Account.h +++ b/libgnucash/engine/mocks/gmock-Account.h @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include "gmock-gobject.h" diff --git a/libgnucash/engine/qofbook.cpp b/libgnucash/engine/qofbook.cpp index f4f277475c..07adcc33e8 100644 --- a/libgnucash/engine/qofbook.cpp +++ b/libgnucash/engine/qofbook.cpp @@ -56,7 +56,7 @@ #include "kvp-frame.hpp" #include "gnc-lot.h" // For GNC_ID_ROOT_ACCOUNT: -#include "AccountP.h" +#include "AccountP.hpp" #include "qofbook.hpp" diff --git a/libgnucash/engine/test-core/test-engine-stuff.cpp b/libgnucash/engine/test-core/test-engine-stuff.cpp index c1a1960f3f..3eb0479e36 100644 --- a/libgnucash/engine/test-core/test-engine-stuff.cpp +++ b/libgnucash/engine/test-core/test-engine-stuff.cpp @@ -58,7 +58,7 @@ #include #include "Account.h" -#include "AccountP.h" +#include "AccountP.hpp" #include "gnc-engine.h" #include "gnc-session.h" #include "Transaction.h" diff --git a/libgnucash/engine/test/test-split-vs-account.cpp b/libgnucash/engine/test/test-split-vs-account.cpp index 9e2f97b6e7..d886cb0da3 100644 --- a/libgnucash/engine/test/test-split-vs-account.cpp +++ b/libgnucash/engine/test/test-split-vs-account.cpp @@ -26,7 +26,7 @@ #include #include "qof.h" #include "cashobjects.h" -#include "AccountP.h" +#include "AccountP.hpp" #include "TransLog.h" #include "gnc-engine.h" #include "test-engine-stuff.h" diff --git a/libgnucash/engine/test/utest-Account.cpp b/libgnucash/engine/test/utest-Account.cpp index 54cfdfb78d..7c52744959 100644 --- a/libgnucash/engine/test/utest-Account.cpp +++ b/libgnucash/engine/test/utest-Account.cpp @@ -30,7 +30,7 @@ /* Add specific headers for this class */ #include "gnc-glib-utils.h" #include "../Account.h" -#include "../AccountP.h" +#include "../AccountP.hpp" #include "../Split.h" #include "../Transaction.h" #include "../gnc-lot.h"