From 83cef67fb46deccd7b0cd86360133a509c98b866 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sun, 9 Jul 2017 13:36:13 -0700 Subject: [PATCH] Header file tidying --- CHANGELOG.md | 1 + include/beast/core.hpp | 4 +++- include/beast/core/file.hpp | 1 + include/beast/core/file_base.hpp | 1 + include/beast/core/file_stdio.hpp | 1 + include/beast/core/read_size.hpp | 1 + include/beast/core/string.hpp | 1 + include/beast/http.hpp | 2 +- include/beast/http/file_body.hpp | 1 + include/beast/zlib.hpp | 2 ++ include/beast/zlib/deflate_stream.hpp | 33 ++++++++++++++------------- include/beast/zlib/error.hpp | 19 +++++++-------- include/beast/zlib/inflate_stream.hpp | 13 ++++++----- include/beast/zlib/zlib.hpp | 15 ++++++------ 14 files changed, 55 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fb78681..b67a7c0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Version 78: * Documentation work * Use make_unique_noinit * Fix warning in zlib +* Header file tidying HTTP: diff --git a/include/beast/core.hpp b/include/beast/core.hpp index 9e63e6df..3084c3e8 100644 --- a/include/beast/core.hpp +++ b/include/beast/core.hpp @@ -21,7 +21,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -31,8 +33,8 @@ #include #include #include -#include #include +#include #include #endif diff --git a/include/beast/core/file.hpp b/include/beast/core/file.hpp index cfe539b8..8b3eecc8 100644 --- a/include/beast/core/file.hpp +++ b/include/beast/core/file.hpp @@ -8,6 +8,7 @@ #ifndef BEAST_CORE_FILE_HPP #define BEAST_CORE_FILE_HPP +#include #include #include #include diff --git a/include/beast/core/file_base.hpp b/include/beast/core/file_base.hpp index 71f3cd1a..d39ebb52 100644 --- a/include/beast/core/file_base.hpp +++ b/include/beast/core/file_base.hpp @@ -8,6 +8,7 @@ #ifndef BEAST_CORE_FILE_BASE_HPP #define BEAST_CORE_FILE_BASE_HPP +#include #include namespace beast { diff --git a/include/beast/core/file_stdio.hpp b/include/beast/core/file_stdio.hpp index cb1972f4..5b8753c6 100644 --- a/include/beast/core/file_stdio.hpp +++ b/include/beast/core/file_stdio.hpp @@ -8,6 +8,7 @@ #ifndef BEAST_CORE_FILE_STDIO_HPP #define BEAST_CORE_FILE_STDIO_HPP +#include #include #include #include diff --git a/include/beast/core/read_size.hpp b/include/beast/core/read_size.hpp index 72ecc9cb..326877f4 100644 --- a/include/beast/core/read_size.hpp +++ b/include/beast/core/read_size.hpp @@ -8,6 +8,7 @@ #ifndef BEAST_READ_SIZE_HELPER_HPP #define BEAST_READ_SIZE_HELPER_HPP +#include #include #include diff --git a/include/beast/core/string.hpp b/include/beast/core/string.hpp index e4ec367e..60116098 100644 --- a/include/beast/core/string.hpp +++ b/include/beast/core/string.hpp @@ -8,6 +8,7 @@ #ifndef BEAST_STRING_HPP #define BEAST_STRING_HPP +#include #include #ifndef BEAST_NO_BOOST_STRING_VIEW # if BOOST_VERSION >= 106400 diff --git a/include/beast/http.hpp b/include/beast/http.hpp index 5c093d2d..b59dde4b 100644 --- a/include/beast/http.hpp +++ b/include/beast/http.hpp @@ -28,8 +28,8 @@ #include #include #include -#include #include +#include #include #endif diff --git a/include/beast/http/file_body.hpp b/include/beast/http/file_body.hpp index 50e7d966..bcc3ab40 100644 --- a/include/beast/http/file_body.hpp +++ b/include/beast/http/file_body.hpp @@ -8,6 +8,7 @@ #ifndef BEAST_HTTP_FILE_BODY_HPP #define BEAST_HTTP_FILE_BODY_HPP +#include #include #include #include diff --git a/include/beast/zlib.hpp b/include/beast/zlib.hpp index 16bbb78f..8fb12d57 100644 --- a/include/beast/zlib.hpp +++ b/include/beast/zlib.hpp @@ -11,6 +11,8 @@ #include #include +#include #include +#include #endif diff --git a/include/beast/zlib/deflate_stream.hpp b/include/beast/zlib/deflate_stream.hpp index 70552263..b94e9e35 100644 --- a/include/beast/zlib/deflate_stream.hpp +++ b/include/beast/zlib/deflate_stream.hpp @@ -4,6 +4,23 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // + +#ifndef BEAST_ZLIB_DEFLATE_STREAM_HPP +#define BEAST_ZLIB_DEFLATE_STREAM_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace beast { +namespace zlib { + // This is a derivative work based on Zlib, copyright below: /* Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -32,22 +49,6 @@ (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). */ -#ifndef BEAST_ZLIB_DEFLATE_STREAM_HPP -#define BEAST_ZLIB_DEFLATE_STREAM_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace beast { -namespace zlib { - /** Raw deflate compressor. This is a port of zlib's "deflate" functionality to C++. diff --git a/include/beast/zlib/error.hpp b/include/beast/zlib/error.hpp index d593917b..7ab17953 100644 --- a/include/beast/zlib/error.hpp +++ b/include/beast/zlib/error.hpp @@ -4,6 +4,16 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // + +#ifndef BEAST_ZLIB_ERROR_HPP +#define BEAST_ZLIB_ERROR_HPP + +#include +#include + +namespace beast { +namespace zlib { + // This is a derivative work based on Zlib, copyright below: /* Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -32,15 +42,6 @@ (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). */ -#ifndef BEAST_ZLIB_ERROR_HPP -#define BEAST_ZLIB_ERROR_HPP - -#include -#include - -namespace beast { -namespace zlib { - /** Error codes returned by the codec. */ enum class error diff --git a/include/beast/zlib/inflate_stream.hpp b/include/beast/zlib/inflate_stream.hpp index bd818335..dd4df6bb 100644 --- a/include/beast/zlib/inflate_stream.hpp +++ b/include/beast/zlib/inflate_stream.hpp @@ -4,6 +4,13 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // + +#ifndef BEAST_ZLIB_INFLATE_STREAM_HPP +#define BEAST_ZLIB_INFLATE_STREAM_HPP + +#include +#include + // This is a derivative work based on Zlib, copyright below: /* Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -32,12 +39,6 @@ (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). */ -#ifndef BEAST_ZLIB_INFLATE_STREAM_HPP -#define BEAST_ZLIB_INFLATE_STREAM_HPP - -#include -#include - namespace beast { namespace zlib { diff --git a/include/beast/zlib/zlib.hpp b/include/beast/zlib/zlib.hpp index b06f679e..217bb191 100644 --- a/include/beast/zlib/zlib.hpp +++ b/include/beast/zlib/zlib.hpp @@ -4,6 +4,14 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // + +#ifndef BEAST_ZLIB_ZLIB_HPP +#define BEAST_ZLIB_ZLIB_HPP + +#include +#include +#include + // This is a derivative work based on Zlib, copyright below: /* Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -32,13 +40,6 @@ (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). */ -#ifndef BEAST_ZLIB_ZLIB_HPP -#define BEAST_ZLIB_ZLIB_HPP - -#include -#include -#include - namespace beast { namespace zlib {