diff --git a/src/backend/BackendFactory.h b/src/backend/BackendFactory.h index 427d4c63..382ec3f5 100644 --- a/src/backend/BackendFactory.h +++ b/src/backend/BackendFactory.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_APP_REPORTING_BACKENDFACTORY_H_INCLUDED -#define RIPPLE_APP_REPORTING_BACKENDFACTORY_H_INCLUDED +#pragma once #include #include @@ -42,5 +41,3 @@ make_Backend(boost::asio::io_context& ioc, clio::Config const& config) return backend; } } // namespace Backend - -#endif // RIPPLE_REPORTING_BACKEND_FACTORY diff --git a/src/backend/BackendInterface.h b/src/backend/BackendInterface.h index 1a36b6c4..f50c94e6 100644 --- a/src/backend/BackendInterface.h +++ b/src/backend/BackendInterface.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_APP_REPORTING_BACKENDINTERFACE_H_INCLUDED -#define RIPPLE_APP_REPORTING_BACKENDINTERFACE_H_INCLUDED +#pragma once #include #include @@ -643,4 +642,3 @@ private: } // namespace Backend using BackendInterface = Backend::BackendInterface; -#endif diff --git a/src/backend/CassandraBackend.h b/src/backend/CassandraBackend.h index 085da9b4..efa71f36 100644 --- a/src/backend/CassandraBackend.h +++ b/src/backend/CassandraBackend.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_APP_REPORTING_CASSANDRABACKEND_H_INCLUDED -#define RIPPLE_APP_REPORTING_CASSANDRABACKEND_H_INCLUDED +#pragma once #include #include @@ -1258,4 +1257,3 @@ public: }; } // namespace Backend -#endif diff --git a/src/backend/DBHelpers.h b/src/backend/DBHelpers.h index 11ba2489..6642bf09 100644 --- a/src/backend/DBHelpers.h +++ b/src/backend/DBHelpers.h @@ -1,5 +1,4 @@ -#ifndef CLIO_BACKEND_DBHELPERS_H_INCLUDED -#define CLIO_BACKEND_DBHELPERS_H_INCLUDED +#pragma once #include #include @@ -181,4 +180,3 @@ uint256ToString(ripple::uint256 const& uint) } static constexpr std::uint32_t rippleEpochStart = 946684800; -#endif diff --git a/src/backend/SimpleCache.h b/src/backend/SimpleCache.h index 5e17c424..7dc24174 100644 --- a/src/backend/SimpleCache.h +++ b/src/backend/SimpleCache.h @@ -1,5 +1,4 @@ -#ifndef CLIO_SIMPLECACHE_H_INCLUDED -#define CLIO_SIMPLECACHE_H_INCLUDED +#pragma once #include #include @@ -78,4 +77,3 @@ public: }; } // namespace Backend -#endif diff --git a/src/backend/Types.h b/src/backend/Types.h index b382e95e..c3f8b618 100644 --- a/src/backend/Types.h +++ b/src/backend/Types.h @@ -1,5 +1,5 @@ -#ifndef CLIO_TYPES_H_INCLUDED -#define CLIO_TYPES_H_INCLUDED +#pragma once + #include #include #include @@ -89,4 +89,3 @@ constexpr ripple::uint256 lastKey{ constexpr ripple::uint256 hi192{ "0000000000000000000000000000000000000000000000001111111111111111"}; } // namespace Backend -#endif diff --git a/src/config/Config.h b/src/config/Config.h index be1d6a7f..fb45f791 100644 --- a/src/config/Config.h +++ b/src/config/Config.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_APP_CONFIG_H_INCLUDED -#define RIPPLE_APP_CONFIG_H_INCLUDED +#pragma once #include @@ -385,5 +384,3 @@ public: }; } // namespace clio - -#endif // RIPPLE_APP_CONFIG_H_INCLUDED diff --git a/src/config/detail/Helpers.h b/src/config/detail/Helpers.h index 81cd0ca1..143f5947 100644 --- a/src/config/detail/Helpers.h +++ b/src/config/detail/Helpers.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_APP_CONFIG_DETAIL_H_INCLUDED -#define RIPPLE_APP_CONFIG_DETAIL_H_INCLUDED +#pragma once #include #include @@ -144,5 +143,3 @@ typeName() } }; // namespace clio::detail - -#endif // RIPPLE_APP_CONFIG_DETAIL_H_INCLUDED diff --git a/src/etl/ETLHelpers.h b/src/etl/ETLHelpers.h index d50709af..fce4584f 100644 --- a/src/etl/ETLHelpers.h +++ b/src/etl/ETLHelpers.h @@ -1,5 +1,5 @@ -#ifndef RIPPLE_APP_REPORTING_ETLHELPERS_H_INCLUDED -#define RIPPLE_APP_REPORTING_ETLHELPERS_H_INCLUDED +#pragma once + #include #include #include @@ -171,5 +171,3 @@ getMarkers(size_t numMarkers) } return markers; } - -#endif // RIPPLE_APP_REPORTING_ETLHELPERS_H_INCLUDED diff --git a/src/etl/ETLSource.h b/src/etl/ETLSource.h index f877c930..449009fc 100644 --- a/src/etl/ETLSource.h +++ b/src/etl/ETLSource.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_APP_REPORTING_ETLSOURCE_H_INCLUDED -#define RIPPLE_APP_REPORTING_ETLSOURCE_H_INCLUDED +#pragma once #include #include @@ -704,5 +703,3 @@ private: bool execute(Func f, uint32_t ledgerSequence); }; - -#endif diff --git a/src/etl/ProbingETLSource.h b/src/etl/ProbingETLSource.h index 3eaf6a04..9ac0c2ba 100644 --- a/src/etl/ProbingETLSource.h +++ b/src/etl/ProbingETLSource.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_APP_REPORTING_PROBINGETLSOURCE_H_INCLUDED -#define RIPPLE_APP_REPORTING_PROBINGETLSOURCE_H_INCLUDED +#pragma once #include #include @@ -92,5 +91,3 @@ private: ETLSourceHooks make_PlainHooks() noexcept; }; - -#endif diff --git a/src/etl/ReportingETL.h b/src/etl/ReportingETL.h index e5e479d1..222b73a6 100644 --- a/src/etl/ReportingETL.h +++ b/src/etl/ReportingETL.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_APP_REPORTING_REPORTINGETL_H_INCLUDED -#define RIPPLE_APP_REPORTING_REPORTINGETL_H_INCLUDED +#pragma once #include #include @@ -395,5 +394,3 @@ public: return now - (rippleEpochStart + closeTime); } }; - -#endif diff --git a/src/log/Logger.h b/src/log/Logger.h index 1b81a824..5da6c9a1 100644 --- a/src/log/Logger.h +++ b/src/log/Logger.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_UTIL_LOGGER_H -#define RIPPLE_UTIL_LOGGER_H +#pragma once #include #include @@ -253,5 +252,3 @@ public: }; }; // namespace clio - -#endif // RIPPLE_UTIL_LOGGER_H diff --git a/src/main/Build.h b/src/main/Build.h index fb581901..525d5ce8 100644 --- a/src/main/Build.h +++ b/src/main/Build.h @@ -1,5 +1,4 @@ -#ifndef CLIO_BUILD_INFO_H -#define CLIO_BUILD_INFO_H +#pragma once #include @@ -12,5 +11,3 @@ std::string const& getClioFullVersionString(); } // namespace Build - -#endif // CLIO_BUILD_INFO_H diff --git a/src/rpc/Counters.h b/src/rpc/Counters.h index 66943acc..74ebbe7c 100644 --- a/src/rpc/Counters.h +++ b/src/rpc/Counters.h @@ -1,5 +1,4 @@ -#ifndef RPC_COUNTERS_H -#define RPC_COUNTERS_H +#pragma once #include #include @@ -53,5 +52,3 @@ public: }; } // namespace RPC - -#endif // RPC_COUNTERS_H diff --git a/src/rpc/Errors.h b/src/rpc/Errors.h index 75edc218..e53df699 100644 --- a/src/rpc/Errors.h +++ b/src/rpc/Errors.h @@ -1,5 +1,4 @@ -#ifndef REPORTING_RPC_ERRORS_H_INCLUDED -#define REPORTING_RPC_ERRORS_H_INCLUDED +#pragma once #include @@ -236,5 +235,3 @@ makeError( std::optional customMessage = std::nullopt); } // namespace RPC - -#endif // REPORTING_RPC_ERRORS_H_INCLUDED diff --git a/src/rpc/Handlers.h b/src/rpc/Handlers.h index e84ec391..fd7937cf 100644 --- a/src/rpc/Handlers.h +++ b/src/rpc/Handlers.h @@ -1,5 +1,4 @@ -#ifndef REPORTING_HANDLERS_H_INCLUDED -#define REPORTING_HANDLERS_H_INCLUDED +#pragma once #include @@ -102,4 +101,3 @@ doServerInfo(Context const& context); Result doRandom(Context const& context); } // namespace RPC -#endif diff --git a/src/rpc/RPC.h b/src/rpc/RPC.h index d595f835..078f7b3b 100644 --- a/src/rpc/RPC.h +++ b/src/rpc/RPC.h @@ -1,5 +1,4 @@ -#ifndef REPORTING_RPC_H_INCLUDED -#define REPORTING_RPC_H_INCLUDED +#pragma once #include #include @@ -146,5 +145,3 @@ logDuration(Context const& ctx, T const& dur) } } // namespace RPC - -#endif // REPORTING_RPC_H_INCLUDED diff --git a/src/rpc/RPCHelpers.h b/src/rpc/RPCHelpers.h index 5ebf864e..05beef5f 100644 --- a/src/rpc/RPCHelpers.h +++ b/src/rpc/RPCHelpers.h @@ -1,6 +1,5 @@ +#pragma once -#ifndef XRPL_REPORTING_RPCHELPERS_H_INCLUDED -#define XRPL_REPORTING_RPCHELPERS_H_INCLUDED /* * This file contains a variety of utility functions used when executing * the handlers @@ -272,4 +271,3 @@ computeBookChanges( std::vector const& transactions); } // namespace RPC -#endif diff --git a/src/rpc/WorkQueue.h b/src/rpc/WorkQueue.h index c17634b8..35d0192c 100644 --- a/src/rpc/WorkQueue.h +++ b/src/rpc/WorkQueue.h @@ -1,5 +1,4 @@ -#ifndef CLIO_WORK_QUEUE_H -#define CLIO_WORK_QUEUE_H +#pragma once #include @@ -77,5 +76,3 @@ private: boost::asio::io_context ioc_ = {}; std::optional work_{ioc_}; }; - -#endif // CLIO_WORK_QUEUE_H diff --git a/src/subscriptions/Message.h b/src/subscriptions/Message.h index 32c58b1d..20e271d7 100644 --- a/src/subscriptions/Message.h +++ b/src/subscriptions/Message.h @@ -1,5 +1,4 @@ -#ifndef CLIO_SUBSCRIPTION_MESSAGE_H -#define CLIO_SUBSCRIPTION_MESSAGE_H +#pragma once #include @@ -36,5 +35,3 @@ public: return message_.size(); } }; - -#endif // CLIO_SUBSCRIPTION_MESSAGE_H \ No newline at end of file diff --git a/src/subscriptions/SubscriptionManager.h b/src/subscriptions/SubscriptionManager.h index bcc268ed..1339d7ac 100644 --- a/src/subscriptions/SubscriptionManager.h +++ b/src/subscriptions/SubscriptionManager.h @@ -1,5 +1,4 @@ -#ifndef SUBSCRIPTION_MANAGER_H -#define SUBSCRIPTION_MANAGER_H +#pragma once #include #include @@ -285,5 +284,3 @@ private: std::unordered_map> cleanupFuncs_ = {}; }; - -#endif // SUBSCRIPTION_MANAGER_H diff --git a/src/util/Taggable.h b/src/util/Taggable.h index 4eaf4c6f..74b7dbd7 100644 --- a/src/util/Taggable.h +++ b/src/util/Taggable.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_UTIL_TAGDECORATOR_H -#define RIPPLE_UTIL_TAGDECORATOR_H +#pragma once #include #include @@ -259,5 +258,3 @@ public: }; } // namespace util - -#endif // RIPPLE_UTIL_TAGDECORATOR_H diff --git a/src/webserver/DOSGuard.h b/src/webserver/DOSGuard.h index e5ef2815..4ae34f58 100644 --- a/src/webserver/DOSGuard.h +++ b/src/webserver/DOSGuard.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_REPORTING_DOS_GUARD_H -#define RIPPLE_REPORTING_DOS_GUARD_H +#pragma once #include #include @@ -100,4 +99,3 @@ private: boost::transform_iterator(std::end(whitelist), transform)}; } }; -#endif diff --git a/src/webserver/HttpBase.h b/src/webserver/HttpBase.h index 4bb6a39a..0b62859b 100644 --- a/src/webserver/HttpBase.h +++ b/src/webserver/HttpBase.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_REPORTING_HTTP_BASE_SESSION_H -#define RIPPLE_REPORTING_HTTP_BASE_SESSION_H +#pragma once #include #include @@ -468,5 +467,3 @@ handle_request( RPC::makeError(RPC::RippledError::rpcINTERNAL)))); } } - -#endif // RIPPLE_REPORTING_HTTP_BASE_SESSION_H diff --git a/src/webserver/HttpSession.h b/src/webserver/HttpSession.h index 9f57f132..ce3fe987 100644 --- a/src/webserver/HttpSession.h +++ b/src/webserver/HttpSession.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_REPORTING_HTTP_SESSION_H -#define RIPPLE_REPORTING_HTTP_SESSION_H +#pragma once #include @@ -91,5 +90,3 @@ public: // At this point the connection is closed gracefully } }; - -#endif // RIPPLE_REPORTING_HTTP_SESSION_H diff --git a/src/webserver/Listener.h b/src/webserver/Listener.h index 272fdb9e..1f479c3d 100644 --- a/src/webserver/Listener.h +++ b/src/webserver/Listener.h @@ -1,5 +1,4 @@ -#ifndef LISTENER_H -#define LISTENER_H +#pragma once #include #include @@ -369,5 +368,3 @@ make_HttpServer( return server; } } // namespace Server - -#endif // LISTENER_H diff --git a/src/webserver/PlainWsSession.h b/src/webserver/PlainWsSession.h index ffe58b48..62012ca6 100644 --- a/src/webserver/PlainWsSession.h +++ b/src/webserver/PlainWsSession.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_REPORTING_WS_SESSION_H -#define RIPPLE_REPORTING_WS_SESSION_H +#pragma once #include #include @@ -210,5 +209,3 @@ private: ->run(std::move(req_)); } }; - -#endif // RIPPLE_REPORTING_WS_SESSION_H diff --git a/src/webserver/Ssl.h b/src/webserver/Ssl.h index fb842480..d97a1167 100644 --- a/src/webserver/Ssl.h +++ b/src/webserver/Ssl.h @@ -1,24 +1,4 @@ -//------------------------------------------------------------------------------ -/* - This file is part of rippled: https://github.com/ripple/rippled - Copyright (c) 2021 Ripple Labs Inc. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef REPORTING_SSL_H -#define REPORTING_SSL_H +#pragma once #include @@ -62,5 +42,3 @@ parse_certs(const char* certFilename, const char* keyFilename) return ctx; } - -#endif // REPORTING_SSL_H \ No newline at end of file diff --git a/src/webserver/SslHttpSession.h b/src/webserver/SslHttpSession.h index b730d172..e25141e9 100644 --- a/src/webserver/SslHttpSession.h +++ b/src/webserver/SslHttpSession.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_REPORTING_HTTPS_SESSION_H -#define RIPPLE_REPORTING_HTTPS_SESSION_H +#pragma once #include @@ -126,5 +125,3 @@ public: // At this point the connection is closed gracefully } }; - -#endif // RIPPLE_REPORTING_HTTPS_SESSION_H diff --git a/src/webserver/SslWsSession.h b/src/webserver/SslWsSession.h index 111d1780..39532d03 100644 --- a/src/webserver/SslWsSession.h +++ b/src/webserver/SslWsSession.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_REPORTING_SSL_WS_SESSION_H -#define RIPPLE_REPORTING_SSL_WS_SESSION_H +#pragma once #include #include @@ -223,5 +222,3 @@ private: ->run(std::move(req_)); } }; - -#endif // RIPPLE_REPORTING_SSL_WS_SESSION_H diff --git a/src/webserver/WsBase.h b/src/webserver/WsBase.h index 250dc0e2..14de053a 100644 --- a/src/webserver/WsBase.h +++ b/src/webserver/WsBase.h @@ -1,5 +1,4 @@ -#ifndef RIPPLE_REPORTING_WS_BASE_SESSION_H -#define RIPPLE_REPORTING_WS_BASE_SESSION_H +#pragma once #include #include @@ -444,5 +443,3 @@ public: do_read(); } }; - -#endif // RIPPLE_REPORTING_WS_BASE_SESSION_H diff --git a/unittests/util/Fixtures.h b/unittests/util/Fixtures.h index 649e22f9..96923f98 100644 --- a/unittests/util/Fixtures.h +++ b/unittests/util/Fixtures.h @@ -1,5 +1,4 @@ -#ifndef CLIO_UNITTEST_FIXTURES_H -#define CLIO_UNITTEST_FIXTURES_H +#pragma once #include #include @@ -89,5 +88,3 @@ protected: boost::log::core::get()->set_logging_enabled(false); } }; - -#endif // CLIO_UNITTEST_FIXTURES_H