summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-07-26 13:32:20 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-07-26 13:32:20 +0100
commit72ae7c3d6128f4dc51ffcef6808b3c78640fdf3c (patch)
tree86f0f31c0902a044a09c533fe60011fc7af92dd6
parentReformat with new clang-format (diff)
downloadicespider-72ae7c3d6128f4dc51ffcef6808b3c78640fdf3c.tar.bz2
icespider-72ae7c3d6128f4dc51ffcef6808b3c78640fdf3c.tar.xz
icespider-72ae7c3d6128f4dc51ffcef6808b3c78640fdf3c.zip
Swap ifndef for pragma once
-rw-r--r--icespider/common/formatters.h5
-rw-r--r--icespider/common/maybeString.h5
-rw-r--r--icespider/common/pathparts.h5
-rw-r--r--icespider/compile/routeCompiler.h5
-rw-r--r--icespider/core/core.h5
-rw-r--r--icespider/core/exceptions.h4
-rw-r--r--icespider/core/flatMap.h5
-rw-r--r--icespider/core/ihttpRequest.h5
-rw-r--r--icespider/core/irouteHandler.h5
-rw-r--r--icespider/core/util.h5
-rw-r--r--icespider/core/xwwwFormUrlEncoded.h5
-rw-r--r--icespider/fcgi/cgiRequest.h5
-rw-r--r--icespider/fcgi/cgiRequestBase.h5
-rw-r--r--icespider/fcgi/fcgiRequest.h5
-rw-r--r--icespider/testing/testRequest.h5
-rw-r--r--icespider/unittests/base2.h5
-rw-r--r--icespider/unittests/string_view_support.h5
-rw-r--r--icespider/xslt/xsltStreamSerializer.h5
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 <compileTimeFormatter.h>
@@ -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 <compare>
#include <iosfwd>
@@ -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 <c++11Helpers.h>
#include <cstddef>
@@ -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 <Ice/BuiltinSequences.h>
#include <Slice/Parser.h>
@@ -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<ErrorHandler>;
}
-
-#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 <string>
@@ -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 <algorithm>
#include <cstddef>
@@ -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 <Ice/Current.h>
@@ -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<const IRouteHandler>;
using RouteHandlerFactory = AdHoc::Factory<IRouteHandler, const Core *>;
}
-
-#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 <Ice/Optional.h>
#include <array>
@@ -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 <boost/algorithm/string/find_iterator.hpp>
#include <functional>
@@ -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 <iosfwd>
@@ -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 <case_less.h>
@@ -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 <fcgiapp.h>
@@ -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 <functional>
#include <http.h>
@@ -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 <visibility.h>
@@ -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 <Ice/OutputStream.h>
#include <Ice/StreamHelpers.h>
@@ -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 <c++11Helpers.h>
#include <filesystem>
@@ -35,5 +34,3 @@ namespace IceSpider {
xsltStylesheet * stylesheet;
};
}
-
-#endif