From 72ae7c3d6128f4dc51ffcef6808b3c78640fdf3c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 26 Jul 2023 13:32:20 +0100 Subject: Swap ifndef for pragma once --- icespider/common/formatters.h | 5 +---- icespider/common/maybeString.h | 5 +---- icespider/common/pathparts.h | 5 +---- icespider/compile/routeCompiler.h | 5 +---- icespider/core/core.h | 5 +---- icespider/core/exceptions.h | 4 +--- icespider/core/flatMap.h | 5 +---- icespider/core/ihttpRequest.h | 5 +---- icespider/core/irouteHandler.h | 5 +---- icespider/core/util.h | 5 +---- icespider/core/xwwwFormUrlEncoded.h | 5 +---- icespider/fcgi/cgiRequest.h | 5 +---- icespider/fcgi/cgiRequestBase.h | 5 +---- icespider/fcgi/fcgiRequest.h | 5 +---- icespider/testing/testRequest.h | 5 +---- icespider/unittests/base2.h | 5 +---- icespider/unittests/string_view_support.h | 5 +---- icespider/xslt/xsltStreamSerializer.h | 5 +---- 18 files changed, 18 insertions(+), 71 deletions(-) diff --git a/icespider/common/formatters.h b/icespider/common/formatters.h index 2b36b08..637bee6 100644 --- a/icespider/common/formatters.h +++ b/icespider/common/formatters.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_COMMON_FORMATTERS_H -#define ICESPIDER_COMMON_FORMATTERS_H +#pragma once #include @@ -8,5 +7,3 @@ namespace IceSpider { AdHocFormatter(HdrFmt, "%?: %?\r\n"); AdHocFormatter(MimeTypeFmt, "%?/%?"); } - -#endif diff --git a/icespider/common/maybeString.h b/icespider/common/maybeString.h index 41ca524..b507777 100644 --- a/icespider/common/maybeString.h +++ b/icespider/common/maybeString.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_COMMON_MAYBESTRING_H -#define ICESPIDER_COMMON_MAYBESTRING_H +#pragma once #include #include @@ -66,5 +65,3 @@ namespace std { return s << ms.value(); } } - -#endif diff --git a/icespider/common/pathparts.h b/icespider/common/pathparts.h index f759730..cb727d6 100644 --- a/icespider/common/pathparts.h +++ b/icespider/common/pathparts.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_CORE_PATHS_H -#define ICESPIDER_CORE_PATHS_H +#pragma once #include #include @@ -51,5 +50,3 @@ namespace IceSpider { PathParts parts; }; } - -#endif diff --git a/icespider/compile/routeCompiler.h b/icespider/compile/routeCompiler.h index 2a09187..99da2ac 100644 --- a/icespider/compile/routeCompiler.h +++ b/icespider/compile/routeCompiler.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_COMPILE_ROURTECOMPILER_H -#define ICESPIDER_COMPILE_ROURTECOMPILER_H +#pragma once #include #include @@ -61,5 +60,3 @@ namespace IceSpider::Compile { #pragma GCC visibility pop }; } - -#endif diff --git a/icespider/core/core.h b/icespider/core/core.h index 7fa66a7..e4c5d0e 100644 --- a/icespider/core/core.h +++ b/icespider/core/core.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_CORE_CORE_H -#define ICESPIDER_CORE_CORE_H +#pragma once #include "irouteHandler.h" #include "util.h" @@ -85,5 +84,3 @@ namespace IceSpider { using ErrorHandlerPlugin = AdHoc::PluginOf; } - -#endif diff --git a/icespider/core/exceptions.h b/icespider/core/exceptions.h index b82f1f3..03bf738 100644 --- a/icespider/core/exceptions.h +++ b/icespider/core/exceptions.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_EXCEPTIONS_H -#define ICESPIDER_EXCEPTIONS_H +#pragma once #include "http.h" #include @@ -24,4 +23,3 @@ namespace IceSpider { } #undef DeclareHttpEx -#endif diff --git a/icespider/core/flatMap.h b/icespider/core/flatMap.h index a0ed57d..a2506d9 100644 --- a/icespider/core/flatMap.h +++ b/icespider/core/flatMap.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_CORE_FLATMAP_H -#define ICESPIDER_CORE_FLATMAP_H +#pragma once #include #include @@ -112,5 +111,3 @@ namespace IceSpider { using const_iterator = typename S::const_iterator; }; } - -#endif diff --git a/icespider/core/ihttpRequest.h b/icespider/core/ihttpRequest.h index e8b1594..25b5e00 100644 --- a/icespider/core/ihttpRequest.h +++ b/icespider/core/ihttpRequest.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_IHTTPREQUEST_H -#define ICESPIDER_IHTTPREQUEST_H +#pragma once #include "exceptions.h" #include @@ -171,5 +170,3 @@ namespace IceSpider { const Core * core; }; } - -#endif diff --git a/icespider/core/irouteHandler.h b/icespider/core/irouteHandler.h index 2b13b22..9282d42 100644 --- a/icespider/core/irouteHandler.h +++ b/icespider/core/irouteHandler.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_IROUTEHANDLER_H -#define ICESPIDER_IROUTEHANDLER_H +#pragma once #include "http.h" #include "ihttpRequest.h" @@ -57,5 +56,3 @@ namespace IceSpider { using IRouteHandlerCPtr = std::shared_ptr; using RouteHandlerFactory = AdHoc::Factory; } - -#endif diff --git a/icespider/core/util.h b/icespider/core/util.h index 7d25830..06ccbcc 100644 --- a/icespider/core/util.h +++ b/icespider/core/util.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_CORE_UTIL_H -#define ICESPIDER_CORE_UTIL_H +#pragma once #include #include @@ -125,5 +124,3 @@ namespace IceSpider { void remove_trailing(std::string_view & in, const char c); void remove_leading(std::string_view & in, const char c); } - -#endif diff --git a/icespider/core/xwwwFormUrlEncoded.h b/icespider/core/xwwwFormUrlEncoded.h index a296864..0f719dd 100644 --- a/icespider/core/xwwwFormUrlEncoded.h +++ b/icespider/core/xwwwFormUrlEncoded.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_CGI_XWWWFORMURLENCODED_H -#define ICESPIDER_CGI_XWWWFORMURLENCODED_H +#pragma once #include #include @@ -44,5 +43,3 @@ namespace IceSpider { }; }; - -#endif diff --git a/icespider/fcgi/cgiRequest.h b/icespider/fcgi/cgiRequest.h index bae6db0..1784932 100644 --- a/icespider/fcgi/cgiRequest.h +++ b/icespider/fcgi/cgiRequest.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_CGI_CGIREQUEST_H -#define ICESPIDER_CGI_CGIREQUEST_H +#pragma once #include "cgiRequestBase.h" #include @@ -15,5 +14,3 @@ namespace IceSpider { std::ostream & getOutputStream() const override; }; } - -#endif diff --git a/icespider/fcgi/cgiRequestBase.h b/icespider/fcgi/cgiRequestBase.h index a576db1..a7cc52d 100644 --- a/icespider/fcgi/cgiRequestBase.h +++ b/icespider/fcgi/cgiRequestBase.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_CGI_CGIREQUESTBASE_H -#define ICESPIDER_CGI_CGIREQUESTBASE_H +#pragma once #include "http.h" #include @@ -49,5 +48,3 @@ namespace IceSpider { PathElements pathElements; }; } - -#endif diff --git a/icespider/fcgi/fcgiRequest.h b/icespider/fcgi/fcgiRequest.h index c77bb68..a85d21f 100644 --- a/icespider/fcgi/fcgiRequest.h +++ b/icespider/fcgi/fcgiRequest.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_CGI_FCGIREQUEST_H -#define ICESPIDER_CGI_FCGIREQUEST_H +#pragma once #include "cgiRequestBase.h" #include @@ -22,5 +21,3 @@ namespace IceSpider { mutable std::ostream output; }; } - -#endif diff --git a/icespider/testing/testRequest.h b/icespider/testing/testRequest.h index 0258572..e274227 100644 --- a/icespider/testing/testRequest.h +++ b/icespider/testing/testRequest.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_TESTING_TESTREQUEST_H -#define ICESPIDER_TESTING_TESTREQUEST_H +#pragma once #include #include @@ -56,5 +55,3 @@ namespace IceSpider { MapVars responseHeaders; }; } - -#endif diff --git a/icespider/unittests/base2.h b/icespider/unittests/base2.h index 0082b4f..3d89330 100644 --- a/icespider/unittests/base2.h +++ b/icespider/unittests/base2.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_TEST_BASE2_H -#define ICESPIDER_TEST_BASE2_H +#pragma once // Standard headers. #include @@ -22,5 +21,3 @@ namespace common { void testMutate(const IceSpider::IHttpRequest *, TestIceSpider::SomeModelPtr &) const; }; // base2 } // namespace common - -#endif diff --git a/icespider/unittests/string_view_support.h b/icespider/unittests/string_view_support.h index 12d8077..41661f0 100644 --- a/icespider/unittests/string_view_support.h +++ b/icespider/unittests/string_view_support.h @@ -1,5 +1,4 @@ -#ifndef ICETRAY_STRING_VIEW_SUPPORT_H -#define ICETRAY_STRING_VIEW_SUPPORT_H +#pragma once #include #include @@ -38,5 +37,3 @@ namespace Ice { } }; } - -#endif diff --git a/icespider/xslt/xsltStreamSerializer.h b/icespider/xslt/xsltStreamSerializer.h index 38868b4..785aa14 100644 --- a/icespider/xslt/xsltStreamSerializer.h +++ b/icespider/xslt/xsltStreamSerializer.h @@ -1,5 +1,4 @@ -#ifndef ICESPIDER_CORE_XSLTSTREAMSERIALIZER_H -#define ICESPIDER_CORE_XSLTSTREAMSERIALIZER_H +#pragma once #include #include @@ -35,5 +34,3 @@ namespace IceSpider { xsltStylesheet * stylesheet; }; } - -#endif -- cgit v1.2.3