From c40a6f46da58201b007e717b6f6100d89a01d2b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rimas=20Misevi=C4=8Dius?= Date: Wed, 3 Jul 2024 22:44:37 +0300 Subject: [PATCH] A #include cleanup in the *.h files * Add directly used header files * Remove unused header files * Update copyright year --- include/upa/buffer.h | 4 ++-- include/upa/str_arg.h | 13 +++++++------ include/upa/str_view.h | 5 ++++- include/upa/url.h | 2 ++ include/upa/url_host.h | 4 +++- include/upa/url_idna.h | 3 ++- include/upa/url_percent_encode.h | 7 +++++-- include/upa/url_utf.h | 3 ++- src/url_ip.cpp | 2 +- 9 files changed, 28 insertions(+), 15 deletions(-) diff --git a/include/upa/buffer.h b/include/upa/buffer.h index 5078e7b9..4c74c7c1 100644 --- a/include/upa/buffer.h +++ b/include/upa/buffer.h @@ -1,4 +1,4 @@ -// Copyright 2016-2023 Rimas Misevičius +// Copyright 2016-2024 Rimas Misevičius // Distributed under the BSD-style license that can be // found in the LICENSE file. // @@ -11,10 +11,10 @@ #define UPA_BUFFER_H #include +#include #include #include #include -#include namespace upa { diff --git a/include/upa/str_arg.h b/include/upa/str_arg.h index 370de991..9bd550a6 100644 --- a/include/upa/str_arg.h +++ b/include/upa/str_arg.h @@ -1,4 +1,4 @@ -// Copyright 2016-2023 Rimas Misevičius +// Copyright 2016-2024 Rimas Misevičius // Distributed under the BSD-style license that can be // found in the LICENSE file. // @@ -21,9 +21,10 @@ inline void procfn(Args&&... args) { #include "config.h" #include "url_utf.h" #include -#include +#include #include #include +#include #ifdef UPA_CPP_17 # include @@ -137,15 +138,15 @@ namespace detail { // test class T has data() member template - static auto test_data(int) -> decltype(std::declval().data()); + auto test_data(int) -> decltype(std::declval().data()); template - static auto test_data(long) -> void; + auto test_data(long) -> void; // test class T has length() member template - static auto test_length(int) -> decltype(std::declval().length()); + auto test_length(int) -> decltype(std::declval().length()); template - static auto test_length(long) -> void; + auto test_length(long) -> void; // T::data() return type (void - if no such member) template diff --git a/include/upa/str_view.h b/include/upa/str_view.h index dc77666d..535c2496 100644 --- a/include/upa/str_view.h +++ b/include/upa/str_view.h @@ -1,4 +1,4 @@ -// Copyright 2016-2023 Rimas Misevičius +// Copyright 2016-2024 Rimas Misevičius // Distributed under the BSD-style license that can be // found in the LICENSE file. // @@ -8,6 +8,9 @@ #include "config.h" #include +#include +#include +#include #include #include diff --git a/include/upa/url.h b/include/upa/url.h index 259e8a7c..2d2ece71 100644 --- a/include/upa/url.h +++ b/include/upa/url.h @@ -29,9 +29,11 @@ #include #include #include +#include #include // uint8_t #include // std::next #include +#include #include #include diff --git a/include/upa/url_host.h b/include/upa/url_host.h index ca143926..ab56dd1e 100644 --- a/include/upa/url_host.h +++ b/include/upa/url_host.h @@ -7,17 +7,19 @@ #define UPA_URL_HOST_H #include "buffer.h" +#include "config.h" #include "str_arg.h" #include "url_idna.h" #include "url_ip.h" +#include "url_percent_encode.h" #include "url_result.h" #include "url_utf.h" #include "util.h" #include // any_of #include #include // uint16_t, uint32_t -#include #include +#include namespace upa { diff --git a/include/upa/url_idna.h b/include/upa/url_idna.h index 321e51e4..3d848752 100644 --- a/include/upa/url_idna.h +++ b/include/upa/url_idna.h @@ -1,4 +1,4 @@ -// Copyright 2016-2023 Rimas Misevičius +// Copyright 2016-2024 Rimas Misevičius // Distributed under the BSD-style license that can be // found in the LICENSE file. // @@ -8,6 +8,7 @@ #include "buffer.h" #include "url_result.h" +#include namespace upa { diff --git a/include/upa/url_percent_encode.h b/include/upa/url_percent_encode.h index 49e460c5..b9d06ecc 100644 --- a/include/upa/url_percent_encode.h +++ b/include/upa/url_percent_encode.h @@ -1,4 +1,4 @@ -// Copyright 2016-2023 Rimas Misevičius +// Copyright 2016-2024 Rimas Misevičius // Distributed under the BSD-style license that can be // found in the LICENSE file. // @@ -14,9 +14,12 @@ #include "str_arg.h" #include "url_utf.h" #include "util.h" -#include +#include #include // uint8_t +#include +#include #include +#include namespace upa { diff --git a/include/upa/url_utf.h b/include/upa/url_utf.h index 4ec8796f..ebc89f3b 100644 --- a/include/upa/url_utf.h +++ b/include/upa/url_utf.h @@ -1,4 +1,4 @@ -// Copyright 2016-2023 Rimas Misevičius +// Copyright 2016-2024 Rimas Misevičius // Distributed under the BSD-style license that can be // found in the LICENSE file. // @@ -8,6 +8,7 @@ #include "buffer.h" #include "url_result.h" +#include #include // uint8_t, uint32_t #include diff --git a/src/url_ip.cpp b/src/url_ip.cpp index 00e0c88a..2dd6f7ae 100644 --- a/src/url_ip.cpp +++ b/src/url_ip.cpp @@ -1,4 +1,4 @@ -// Copyright 2016-2023 Rimas Misevičius +// Copyright 2016-2024 Rimas Misevičius // Distributed under the BSD-style license that can be // found in the LICENSE file. //