diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-11 23:11:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 23:11:19 +0200 |
commit | 78899a211b2f68e397e9d18b9907509558350901 (patch) | |
tree | 429044765545c2a7e2efe8c2ad5a42aed36c5ae6 | |
parent | 8aac3d98ab790040046bbe5b516ae17d89a97906 (diff) | |
parent | 72d685a258a8632b6769f033f30ebdea84d612b2 (diff) | |
download | fork-ledger-78899a211b2f68e397e9d18b9907509558350901.tar.gz fork-ledger-78899a211b2f68e397e9d18b9907509558350901.tar.bz2 fork-ledger-78899a211b2f68e397e9d18b9907509558350901.zip |
Merge pull request #2230 from afh/pragma-once
Modernize codebase with #pragma once
-rw-r--r-- | src/account.h | 5 | ||||
-rw-r--r-- | src/amount.h | 5 | ||||
-rw-r--r-- | src/annotate.h | 5 | ||||
-rw-r--r-- | src/balance.h | 5 | ||||
-rw-r--r-- | src/chain.h | 5 | ||||
-rw-r--r-- | src/commodity.h | 5 | ||||
-rw-r--r-- | src/compare.h | 5 | ||||
-rw-r--r-- | src/context.h | 5 | ||||
-rw-r--r-- | src/convert.h | 5 | ||||
-rw-r--r-- | src/csv.h | 5 | ||||
-rw-r--r-- | src/draft.h | 5 | ||||
-rw-r--r-- | src/emacs.h | 5 | ||||
-rw-r--r-- | src/error.h | 5 | ||||
-rw-r--r-- | src/expr.h | 5 | ||||
-rw-r--r-- | src/exprbase.h | 5 | ||||
-rw-r--r-- | src/filters.h | 5 | ||||
-rw-r--r-- | src/flags.h | 5 | ||||
-rw-r--r-- | src/format.h | 5 | ||||
-rw-r--r-- | src/generate.h | 5 | ||||
-rw-r--r-- | src/global.h | 5 | ||||
-rw-r--r-- | src/history.h | 5 | ||||
-rw-r--r-- | src/item.h | 5 | ||||
-rw-r--r-- | src/iterators.h | 5 | ||||
-rw-r--r-- | src/journal.h | 5 | ||||
-rw-r--r-- | src/lookup.h | 5 | ||||
-rw-r--r-- | src/mask.h | 5 | ||||
-rw-r--r-- | src/op.h | 5 | ||||
-rw-r--r-- | src/option.h | 5 | ||||
-rw-r--r-- | src/output.h | 5 | ||||
-rw-r--r-- | src/parser.h | 5 | ||||
-rw-r--r-- | src/pool.h | 5 | ||||
-rw-r--r-- | src/post.h | 5 | ||||
-rw-r--r-- | src/precmd.h | 5 | ||||
-rw-r--r-- | src/predicate.h | 5 | ||||
-rw-r--r-- | src/print.h | 5 | ||||
-rw-r--r-- | src/pstream.h | 5 | ||||
-rw-r--r-- | src/ptree.h | 5 | ||||
-rw-r--r-- | src/pyinterp.h | 6 | ||||
-rw-r--r-- | src/pyutils.h | 6 | ||||
-rw-r--r-- | src/query.h | 5 | ||||
-rw-r--r-- | src/quotes.h | 5 | ||||
-rw-r--r-- | src/report.h | 5 | ||||
-rw-r--r-- | src/scope.h | 5 | ||||
-rw-r--r-- | src/select.h | 5 | ||||
-rw-r--r-- | src/session.h | 5 | ||||
-rw-r--r-- | src/stats.h | 5 | ||||
-rw-r--r-- | src/stream.h | 5 | ||||
-rw-r--r-- | src/strptime.h | 5 | ||||
-rw-r--r-- | src/temps.h | 5 | ||||
-rw-r--r-- | src/timelog.h | 5 | ||||
-rw-r--r-- | src/times.h | 5 | ||||
-rw-r--r-- | src/token.h | 5 | ||||
-rw-r--r-- | src/unistring.h | 5 | ||||
-rw-r--r-- | src/utils.h | 5 | ||||
-rw-r--r-- | src/value.h | 5 | ||||
-rw-r--r-- | src/views.h | 5 | ||||
-rw-r--r-- | src/xact.h | 5 |
57 files changed, 57 insertions, 230 deletions
diff --git a/src/account.h b/src/account.h index 15666263..871a3516 100644 --- a/src/account.h +++ b/src/account.h @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_ACCOUNT_H -#define INCLUDED_ACCOUNT_H +#pragma once #include "scope.h" @@ -304,5 +303,3 @@ struct account_compare { }; } // namespace ledger - -#endif // INCLUDED_ACCOUNT_H diff --git a/src/amount.h b/src/amount.h index 61d4ae7f..8d0018d7 100644 --- a/src/amount.h +++ b/src/amount.h @@ -50,8 +50,7 @@ * automatically expanded to include as many extra digits as necessary * to avoid losing information. */ -#ifndef INCLUDED_AMOUNT_H -#define INCLUDED_AMOUNT_H +#pragma once #include "utils.h" #include "times.h" @@ -786,5 +785,3 @@ void put_amount(property_tree::ptree& pt, const amount_t& amt, bool commodity_details = false); } // namespace ledger - -#endif // INCLUDED_AMOUNT_H diff --git a/src/annotate.h b/src/annotate.h index 500c43d2..1564b812 100644 --- a/src/annotate.h +++ b/src/annotate.h @@ -43,8 +43,7 @@ * * Long. */ -#ifndef INCLUDED_ANNOTATE_H -#define INCLUDED_ANNOTATE_H +#pragma once #include "expr.h" @@ -232,5 +231,3 @@ as_annotated_commodity(const commodity_t& commodity) { } } // namespace ledger - -#endif // INCLUDED_ANNOTATE_H diff --git a/src/balance.h b/src/balance.h index 9065efe6..0551222b 100644 --- a/src/balance.h +++ b/src/balance.h @@ -46,8 +46,7 @@ * is designed to allow this, tracking the amounts of each component * commodity separately. */ -#ifndef INCLUDED_BALANCE_H -#define INCLUDED_BALANCE_H +#pragma once #include "amount.h" @@ -609,5 +608,3 @@ void put_balance(property_tree::ptree& pt, const balance_t& bal); balance_t average_lot_prices(const balance_t& bal); } // namespace ledger - -#endif // INCLUDED_BALANCE_H diff --git a/src/chain.h b/src/chain.h index 93d17918..0c870c3a 100644 --- a/src/chain.h +++ b/src/chain.h @@ -39,8 +39,7 @@ * * @ingroup report */ -#ifndef INCLUDED_CHAIN_H -#define INCLUDED_CHAIN_H +#pragma once #include "utils.h" @@ -112,5 +111,3 @@ chain_handlers(post_handler_ptr handler, } } // namespace ledger - -#endif // INCLUDED_CHAIN_H diff --git a/src/commodity.h b/src/commodity.h index d8ca4c39..8177fb4e 100644 --- a/src/commodity.h +++ b/src/commodity.h @@ -44,8 +44,7 @@ * This file contains one of the most basic types in Ledger: * commodity_t, and its annotated cousin, annotated_commodity_t. */ -#ifndef INCLUDED_COMMODITY_H -#define INCLUDED_COMMODITY_H +#pragma once #include "expr.h" @@ -299,5 +298,3 @@ struct commodity_compare { }; } // namespace ledger - -#endif // INCLUDED_COMMODITY_H diff --git a/src/compare.h b/src/compare.h index 6c7141f6..1a329ad6 100644 --- a/src/compare.h +++ b/src/compare.h @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_COMPARE_H -#define INCLUDED_COMPARE_H +#pragma once #include "expr.h" @@ -96,5 +95,3 @@ bool compare_items<account_t>::operator()(account_t * left, account_t * right); } // namespace ledger - -#endif // INCLUDED_COMPARE_H diff --git a/src/context.h b/src/context.h index a1b48bdd..ecceea2b 100644 --- a/src/context.h +++ b/src/context.h @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_CONTEXT_H -#define INCLUDED_CONTEXT_H +#pragma once #include "utils.h" #include "times.h" @@ -166,5 +165,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_CONTEXT_H diff --git a/src/convert.h b/src/convert.h index 220c5108..4b00581a 100644 --- a/src/convert.h +++ b/src/convert.h @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_CONVERT_H -#define INCLUDED_CONVERT_H +#pragma once #include "value.h" @@ -51,5 +50,3 @@ class call_scope_t; value_t convert_command(call_scope_t& scope); } // namespace ledger - -#endif // INCLUDED_CONVERT_H @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_CSV_H -#define INCLUDED_CSV_H +#pragma once #include "value.h" #include "context.h" @@ -114,5 +113,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_CSV_H diff --git a/src/draft.h b/src/draft.h index bee04238..09a6ec30 100644 --- a/src/draft.h +++ b/src/draft.h @@ -39,8 +39,7 @@ * * @ingroup report */ -#ifndef INCLUDED_DRAFT_H -#define INCLUDED_DRAFT_H +#pragma once #include "exprbase.h" #include "value.h" @@ -128,5 +127,3 @@ value_t xact_command(call_scope_t& args); value_t template_command(call_scope_t& args); } // namespace ledger - -#endif // INCLUDED_DRAFT_H diff --git a/src/emacs.h b/src/emacs.h index 957f5be9..4cf46e6b 100644 --- a/src/emacs.h +++ b/src/emacs.h @@ -39,8 +39,7 @@ * * @ingroup report */ -#ifndef INCLUDED_EMACS_H -#define INCLUDED_EMACS_H +#pragma once #include "chain.h" @@ -76,5 +75,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_EMACS_H diff --git a/src/error.h b/src/error.h index b21f3cdc..63d729d4 100644 --- a/src/error.h +++ b/src/error.h @@ -39,8 +39,7 @@ * * @ingroup util */ -#ifndef INCLUDED_ERROR_H -#define INCLUDED_ERROR_H +#pragma once namespace ledger { @@ -101,5 +100,3 @@ struct error_count { }; } // namespace ledger - -#endif // INCLUDED_ERROR_H @@ -39,8 +39,7 @@ * * @ingroup expr */ -#ifndef INCLUDED_EXPR_H -#define INCLUDED_EXPR_H +#pragma once #include "exprbase.h" #include "value.h" @@ -184,5 +183,3 @@ class call_scope_t; value_t source_command(call_scope_t& scope); } // namespace ledger - -#endif // INCLUDED_EXPR_H diff --git a/src/exprbase.h b/src/exprbase.h index 37a15680..274f3cdf 100644 --- a/src/exprbase.h +++ b/src/exprbase.h @@ -51,8 +51,7 @@ * | draft_t | Partially filled xacts | xact_t * | | * | format_t | Format strings | string | | */ -#ifndef INCLUDED_EXPRBASE_H -#define INCLUDED_EXPRBASE_H +#pragma once #include "utils.h" #include "amount.h" @@ -241,5 +240,3 @@ std::ostream& operator<<(std::ostream& out, } } // namespace ledger - -#endif // INCLUDED_EXPRBASE_H diff --git a/src/filters.h b/src/filters.h index 86464e94..6a4e6cf4 100644 --- a/src/filters.h +++ b/src/filters.h @@ -39,8 +39,7 @@ * * @ingroup report */ -#ifndef INCLUDED_FILTERS_H -#define INCLUDED_FILTERS_H +#pragma once #include "chain.h" #include "xact.h" @@ -1083,5 +1082,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_FILTERS_H diff --git a/src/flags.h b/src/flags.h index cfcf15fd..fb7096c0 100644 --- a/src/flags.h +++ b/src/flags.h @@ -39,8 +39,7 @@ * * @ingroup util */ -#ifndef INCLUDED_FLAGS_H -#define INCLUDED_FLAGS_H +#pragma once template <typename T = boost::uint_least8_t, typename U = T> @@ -183,5 +182,3 @@ public: _flags.drop_flags(arg); } }; - -#endif // INCLUDED_FLAGS_H diff --git a/src/format.h b/src/format.h index 44f1094a..c1c8701a 100644 --- a/src/format.h +++ b/src/format.h @@ -39,8 +39,7 @@ * * @ingroup expr */ -#ifndef INCLUDED_FORMAT_H -#define INCLUDED_FORMAT_H +#pragma once #include "expr.h" #include "unistring.h" @@ -165,5 +164,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_FORMAT_H diff --git a/src/generate.h b/src/generate.h index d8fca4c1..abc603b9 100644 --- a/src/generate.h +++ b/src/generate.h @@ -39,8 +39,7 @@ * * @ingroup report */ -#ifndef INCLUDED_GENERATE_H -#define INCLUDED_GENERATE_H +#pragma once #include "iterators.h" @@ -126,5 +125,3 @@ protected: }; } // namespace ledger - -#endif // INCLUDED_GENERATE_H diff --git a/src/global.h b/src/global.h index 5a29796d..9607ba1a 100644 --- a/src/global.h +++ b/src/global.h @@ -35,8 +35,7 @@ * * @brief Contains the top-level functions used by main.cc */ -#ifndef INCLUDED_GLOBAL_H -#define INCLUDED_GLOBAL_H +#pragma once #include "option.h" #include "report.h" @@ -182,5 +181,3 @@ See LICENSE file included with the distribution for details and disclaimer."); void handle_debug_options(int argc, char * argv[]); } // namespace ledger - -#endif // INCLUDED_GLOBAL_H diff --git a/src/history.h b/src/history.h index 16d03c4d..378d6356 100644 --- a/src/history.h +++ b/src/history.h @@ -43,8 +43,7 @@ * * Long. */ -#ifndef INCLUDED_HISTORY_H -#define INCLUDED_HISTORY_H +#pragma once #include "amount.h" #include "commodity.h" @@ -92,5 +91,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_HISTORY_H @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_ITEM_H -#define INCLUDED_ITEM_H +#pragma once #include "scope.h" @@ -214,5 +213,3 @@ string item_context(const item_t& item, const string& desc); void put_metadata(property_tree::ptree& pt, const item_t::string_map& metadata); } // namespace ledger - -#endif // INCLUDED_ITEM_H diff --git a/src/iterators.h b/src/iterators.h index a88f17d6..d7620196 100644 --- a/src/iterators.h +++ b/src/iterators.h @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_ITERATORS_H -#define INCLUDED_ITERATORS_H +#pragma once #include "xact.h" #include "post.h" @@ -325,5 +324,3 @@ private: }; } // namespace ledger - -#endif // INCLUDED_ITERATORS_H diff --git a/src/journal.h b/src/journal.h index d576c110..06bcbd4f 100644 --- a/src/journal.h +++ b/src/journal.h @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_JOURNAL_H -#define INCLUDED_JOURNAL_H +#pragma once #include "utils.h" #include "times.h" @@ -202,5 +201,3 @@ private: }; } // namespace ledger - -#endif // INCLUDED_JOURNAL_H diff --git a/src/lookup.h b/src/lookup.h index 601fbb9d..53d136b1 100644 --- a/src/lookup.h +++ b/src/lookup.h @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_LOOKUP_H -#define INCLUDED_LOOKUP_H +#pragma once #include "iterators.h" @@ -53,5 +52,3 @@ lookup_probable_account(const string& ident, account_t * ref_account = NULL); } // namespace ledger - -#endif // INCLUDED_LOOKUP_H @@ -41,8 +41,7 @@ * * @brief Regular expression masking. */ -#ifndef INCLUDED_MASK_H -#define INCLUDED_MASK_H +#pragma once #include "utils.h" #if HAVE_BOOST_REGEX_UNICODE @@ -136,5 +135,3 @@ inline void put_mask(property_tree::ptree& pt, const mask_t& mask) { } } // namespace ledger - -#endif // INCLUDED_MASK_H @@ -39,8 +39,7 @@ * * @ingroup expr */ -#ifndef INCLUDED_OP_H -#define INCLUDED_OP_H +#pragma once #include "expr.h" @@ -347,5 +346,3 @@ string op_context(const expr_t::ptr_op_t op, value_t split_cons_expr(expr_t::ptr_op_t op); } // namespace ledger - -#endif // INCLUDED_OP_H diff --git a/src/option.h b/src/option.h index 0d6c5140..35b1c893 100644 --- a/src/option.h +++ b/src/option.h @@ -41,8 +41,7 @@ * * @brief Basic type and macros for handling command-line options */ -#ifndef INCLUDED_OPTION_H -#define INCLUDED_OPTION_H +#pragma once #include "scope.h" @@ -299,5 +298,3 @@ strings_list process_arguments(strings_list args, scope_t& scope); DECLARE_EXCEPTION(option_error, std::runtime_error); } // namespace ledger - -#endif // INCLUDED_OPTION_H diff --git a/src/output.h b/src/output.h index efa530e1..c5f5c175 100644 --- a/src/output.h +++ b/src/output.h @@ -39,8 +39,7 @@ * * @ingroup report */ -#ifndef INCLUDED_OUTPUT_H -#define INCLUDED_OUTPUT_H +#pragma once #include "chain.h" #include "predicate.h" @@ -247,5 +246,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_OUTPUT_H diff --git a/src/parser.h b/src/parser.h index 7cf488e0..881e5445 100644 --- a/src/parser.h +++ b/src/parser.h @@ -39,8 +39,7 @@ * * @ingroup expr */ -#ifndef INCLUDED_PARSER_H -#define INCLUDED_PARSER_H +#pragma once #include "token.h" #include "op.h" @@ -122,5 +121,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_PARSER_H @@ -43,8 +43,7 @@ * * Long. */ -#ifndef INCLUDED_POOL_H -#define INCLUDED_POOL_H +#pragma once #include "history.h" #include "annotate.h" @@ -135,5 +134,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_POOL_H @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_POST_H -#define INCLUDED_POST_H +#pragma once #include "item.h" @@ -268,5 +267,3 @@ void extend_post(post_t& post, journal_t& journal); void put_post(property_tree::ptree& pt, const post_t& post); } // namespace ledger - -#endif // INCLUDED_POST_H diff --git a/src/precmd.h b/src/precmd.h index cf7b42f4..2240d7d3 100644 --- a/src/precmd.h +++ b/src/precmd.h @@ -39,8 +39,7 @@ * * @ingroup report */ -#ifndef INCLUDED_PRECMD_H -#define INCLUDED_PRECMD_H +#pragma once #include "value.h" @@ -55,5 +54,3 @@ value_t period_command(call_scope_t& args); value_t query_command(call_scope_t& args); } // namespace ledger - -#endif // INCLUDED_PRECMD_H diff --git a/src/predicate.h b/src/predicate.h index ba5c14c3..79f71d88 100644 --- a/src/predicate.h +++ b/src/predicate.h @@ -39,8 +39,7 @@ * * @ingroup expr */ -#ifndef INCLUDED_PREDICATE_H -#define INCLUDED_PREDICATE_H +#pragma once #include "expr.h" #include "commodity.h" @@ -93,5 +92,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_PREDICATE_H diff --git a/src/print.h b/src/print.h index fe24a8dc..30f7118b 100644 --- a/src/print.h +++ b/src/print.h @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_PRINT_H -#define INCLUDED_PRINT_H +#pragma once #include "chain.h" #include "predicate.h" @@ -87,5 +86,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_PRINT_H diff --git a/src/pstream.h b/src/pstream.h index fa2f1d9f..2502fdac 100644 --- a/src/pstream.h +++ b/src/pstream.h @@ -39,8 +39,7 @@ * * @ingroup util */ -#ifndef INCLUDED_PSTREAM_H -#define INCLUDED_PSTREAM_H +#pragma once //#include <istream> //#include <streambuf> @@ -110,5 +109,3 @@ public: rdbuf(&buf); } }; - -#endif // INCLUDED_PSTREAM_H diff --git a/src/ptree.h b/src/ptree.h index 1ffbe3dd..662f9807 100644 --- a/src/ptree.h +++ b/src/ptree.h @@ -40,8 +40,7 @@ * @ingroup report * */ -#ifndef INCLUDED_PTREE_H -#define INCLUDED_PTREE_H +#pragma once #include "chain.h" @@ -96,5 +95,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_PTREE_H diff --git a/src/pyinterp.h b/src/pyinterp.h index e9eb2312..57fb176b 100644 --- a/src/pyinterp.h +++ b/src/pyinterp.h @@ -41,9 +41,7 @@ * * @brief Basic type for Python API. */ - -#ifndef INCLUDED_PYINTERP_H -#define INCLUDED_PYINTERP_H +#pragma once #include "session.h" @@ -158,5 +156,3 @@ extern shared_ptr<python_interpreter_t> python_session; } // namespace ledger #endif // HAVE_BOOST_PYTHON - -#endif // INCLUDED_PYINTERP_H diff --git a/src/pyutils.h b/src/pyutils.h index f7c04910..aa9c4451 100644 --- a/src/pyutils.h +++ b/src/pyutils.h @@ -37,9 +37,7 @@ * * @brief Basic utilities for Python API. */ - -#ifndef INCLUDED_PYUTILS_H -#define INCLUDED_PYUTILS_H +#pragma once template <typename T, typename TfromPy> struct object_from_python @@ -192,5 +190,3 @@ namespace boost { namespace python { } } // namespace boost::python //boost::python::register_ptr_to_python< boost::shared_ptr<Base> >(); - -#endif // INCLUDED_PYUTILS_H diff --git a/src/query.h b/src/query.h index 5318b59d..20a7bc18 100644 --- a/src/query.h +++ b/src/query.h @@ -39,8 +39,7 @@ * * @ingroup expr */ -#ifndef INCLUDED_QUERY_H -#define INCLUDED_QUERY_H +#pragma once #include "predicate.h" @@ -348,5 +347,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_QUERY_H diff --git a/src/quotes.h b/src/quotes.h index 04cb986c..456376c2 100644 --- a/src/quotes.h +++ b/src/quotes.h @@ -39,8 +39,7 @@ * * @ingroup extra */ -#ifndef INCLUDED_QUOTES_H -#define INCLUDED_QUOTES_H +#pragma once namespace ledger { @@ -49,5 +48,3 @@ commodity_quote_from_script(commodity_t& commodity, const commodity_t * exchange_commodity); } // namespace ledger - -#endif // INCLUDED_QUOTES_H diff --git a/src/report.h b/src/report.h index 6c33889c..a63360ca 100644 --- a/src/report.h +++ b/src/report.h @@ -39,8 +39,7 @@ * * @ingroup report */ -#ifndef INCLUDED_REPORT_H -#define INCLUDED_REPORT_H +#pragma once #include "expr.h" #include "query.h" @@ -1110,5 +1109,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_REPORT_H diff --git a/src/scope.h b/src/scope.h index f9243962..ab7d03c9 100644 --- a/src/scope.h +++ b/src/scope.h @@ -39,8 +39,7 @@ * * @ingroup expr */ -#ifndef INCLUDED_SCOPE_H -#define INCLUDED_SCOPE_H +#pragma once #include "op.h" @@ -616,5 +615,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_SCOPE_H diff --git a/src/select.h b/src/select.h index 3c0bc96a..bb7b9355 100644 --- a/src/select.h +++ b/src/select.h @@ -39,8 +39,7 @@ * * @ingroup select */ -#ifndef INCLUDED_SELECT_H -#define INCLUDED_SELECT_H +#pragma once #include "utils.h" #include "value.h" @@ -51,5 +50,3 @@ class call_scope_t; value_t select_command(call_scope_t& args); } // namespace ledger - -#endif // INCLUDED_SELECT_H diff --git a/src/session.h b/src/session.h index 132c38a9..c296f0fb 100644 --- a/src/session.h +++ b/src/session.h @@ -39,8 +39,7 @@ * * @ingroup report */ -#ifndef INCLUDED_SESSION_H -#define INCLUDED_SESSION_H +#pragma once #include "account.h" #include "journal.h" @@ -191,5 +190,3 @@ public: void set_session_context(session_t * session); } // namespace ledger - -#endif // INCLUDED_SESSION_H diff --git a/src/stats.h b/src/stats.h index 7ea4f7b0..6912762d 100644 --- a/src/stats.h +++ b/src/stats.h @@ -39,8 +39,7 @@ * * @ingroup report */ -#ifndef INCLUDED_STATS_H -#define INCLUDED_STATS_H +#pragma once #include "value.h" @@ -51,5 +50,3 @@ class call_scope_t; value_t report_statistics(call_scope_t& scope); } // namespace ledger - -#endif // INCLUDED_STATS_H diff --git a/src/stream.h b/src/stream.h index 491f6fac..a4887754 100644 --- a/src/stream.h +++ b/src/stream.h @@ -45,8 +45,7 @@ * child process, different cleanup is needed for each scenario. This * file abstracts those various needs. */ -#ifndef INCLUDED_STREAM_H -#define INCLUDED_STREAM_H +#pragma once #include "utils.h" @@ -138,5 +137,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_STREAM_H diff --git a/src/strptime.h b/src/strptime.h index cccae1c4..efd6e91b 100644 --- a/src/strptime.h +++ b/src/strptime.h @@ -23,9 +23,6 @@ * * @brief Implements strptime under Windows */ -#ifndef INCLUDED_STRPTIME_H -#define INCLUDED_STRPTIME_H +#pragma once char* strptime(const char *buf, const char *fmt, struct tm *tm); - -#endif // INCLUDED_STRPTIME_H diff --git a/src/temps.h b/src/temps.h index 19db5415..ad8bc749 100644 --- a/src/temps.h +++ b/src/temps.h @@ -39,8 +39,7 @@ * * @ingroup report */ -#ifndef INCLUDED_TEMPS_H -#define INCLUDED_TEMPS_H +#pragma once namespace ledger { @@ -81,5 +80,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_TEMPS_H diff --git a/src/timelog.h b/src/timelog.h index 337271cc..36aaf035 100644 --- a/src/timelog.h +++ b/src/timelog.h @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_TIMELOG_H -#define INCLUDED_TIMELOG_H +#pragma once #include "utils.h" #include "times.h" @@ -107,5 +106,3 @@ public: }; } // namespace ledger - -#endif // INCLUDED_TIMELOG_H diff --git a/src/times.h b/src/times.h index a7a92825..b9d48521 100644 --- a/src/times.h +++ b/src/times.h @@ -41,8 +41,7 @@ * * @brief datetime_t and date_t objects */ -#ifndef INCLUDED_TIMES_H -#define INCLUDED_TIMES_H +#pragma once #include "utils.h" @@ -532,5 +531,3 @@ void show_period_tokens(std::ostream& out, const string& arg); std::ostream& operator<<(std::ostream& out, const date_duration_t& duration); } // namespace ledger - -#endif // INCLUDED_TIMES_H diff --git a/src/token.h b/src/token.h index 2efd3517..2848a616 100644 --- a/src/token.h +++ b/src/token.h @@ -39,8 +39,7 @@ * * @ingroup expr */ -#ifndef INCLUDED_TOKEN_H -#define INCLUDED_TOKEN_H +#pragma once #include "expr.h" @@ -134,5 +133,3 @@ std::ostream& operator<<(std::ostream& out, const expr_t::token_t::kind_t& kind) std::ostream& operator<<(std::ostream& out, const expr_t::token_t& token); } // namespace ledger - -#endif // INCLUDED_TOKEN_H diff --git a/src/unistring.h b/src/unistring.h index 4a468a98..6761accb 100644 --- a/src/unistring.h +++ b/src/unistring.h @@ -39,8 +39,7 @@ * * @ingroup utils */ -#ifndef INCLUDED_UNISTRING_H -#define INCLUDED_UNISTRING_H +#pragma once namespace ledger { @@ -204,5 +203,3 @@ inline void justify(std::ostream& out, } } // namespace ledger - -#endif // INCLUDED_UNISTRING_H diff --git a/src/utils.h b/src/utils.h index 9cc51396..7ca5935a 100644 --- a/src/utils.h +++ b/src/utils.h @@ -41,8 +41,7 @@ * * @brief General utility facilities used by Ledger */ -#ifndef INCLUDED_UTILS_H -#define INCLUDED_UTILS_H +#pragma once #include <boost/uuid/detail/sha1.hpp> @@ -633,5 +632,3 @@ extern const string version; } // namespace ledger /*@}*/ - -#endif // INCLUDED_UTILS_H diff --git a/src/value.h b/src/value.h index b0ac865d..cd539bc2 100644 --- a/src/value.h +++ b/src/value.h @@ -46,8 +46,7 @@ * the number 10 to a value object, it's internal type will be * INTEGER. */ -#ifndef INCLUDED_VALUE_H -#define INCLUDED_VALUE_H +#pragma once #include "balance.h" // includes amount.h #include "mask.h" @@ -997,5 +996,3 @@ bool sort_value_is_less_than(const std::list<sort_value_t>& left_values, void put_value(property_tree::ptree& pt, const value_t& value); } // namespace ledger - -#endif // INCLUDED_VALUE_H diff --git a/src/views.h b/src/views.h index 7ced3ce9..9e8bc7c0 100644 --- a/src/views.h +++ b/src/views.h @@ -39,8 +39,7 @@ * * @ingroup views */ -#ifndef INCLUDED_VIEWS_H -#define INCLUDED_VIEWS_H +#pragma once #include "utils.h" @@ -453,5 +452,3 @@ void populate_journal(r_journal_ptr journal, report_t& report, } // namespace ledger #endif /* DOCUMENT_MODEL */ - -#endif // INCLUDED_VIEWS_H @@ -39,8 +39,7 @@ * * @ingroup data */ -#ifndef INCLUDED_XACT_H -#define INCLUDED_XACT_H +#pragma once #include "item.h" #include "predicate.h" @@ -235,5 +234,3 @@ typedef std::list<period_xact_t *> period_xacts_list; void put_xact(property_tree::ptree& pt, const xact_t& xact); } // namespace ledger - -#endif // INCLUDED_XACT_H |