]> git.tdb.fi Git - libs/net.git/commitdiff
Include the matching header first in .cpp files
authorMikko Rasa <tdb@tdb.fi>
Sun, 11 Dec 2022 09:39:07 +0000 (11:39 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 11 Dec 2022 16:26:44 +0000 (18:26 +0200)
This avoids accidentally using transitively included headers.

26 files changed:
source/http/client.cpp
source/http/formdata.cpp
source/http/header.cpp
source/http/message.cpp
source/http/request.cpp
source/http/response.cpp
source/http/server.cpp
source/http/utils.cpp
source/http/version.cpp
source/net/clientsocket.cpp
source/net/communicator.cpp
source/net/constants.cpp
source/net/datagramsocket.cpp
source/net/inet.cpp
source/net/inet6.cpp
source/net/protocol.cpp
source/net/resolve.cpp
source/net/serversocket.cpp
source/net/sockaddr.cpp
source/net/socket.cpp
source/net/streamserversocket.cpp
source/net/streamsocket.cpp
source/net/unix/socket.cpp
source/net/unix/unix.cpp
source/net/windows/socket.cpp
source/net/windows/unix.cpp

index e8790aa65bcc8b57e6d4dcb557319a7161f71c68..1c4c953e5d5d5fb31b3243e13a2fa6d728d12a33 100644 (file)
@@ -1,7 +1,7 @@
+#include "client.h"
 #include <msp/core/except.h>
 #include <msp/net/resolve.h>
 #include <msp/time/timedelta.h>
-#include "client.h"
 #include "request.h"
 #include "response.h"
 
index 4ec3f8867f8039399255283205f6fae231fba585..4f2b7b3fa4de926e983f173d8dd7fdc386ce8fab 100644 (file)
@@ -1,9 +1,9 @@
+#include "formdata.h"
 #include <msp/core/maputils.h>
 #include "header.h"
 #include "request.h"
 #include "submessage.h"
 #include "utils.h"
-#include "formdata.h"
 
 using namespace std;
 
index b55223e8d51cf082ad2db22fa08ed46b93b16492..a112e91b6246155139743bc063873aae5e2c41bd 100644 (file)
@@ -1,6 +1,6 @@
+#include "header.h"
 #include <stdexcept>
 #include <msp/strings/utils.h>
-#include "header.h"
 #include "message.h"
 
 using namespace std;
index 4f17017823df937f152f2f2e56780fa420c0ad98..a6ab4653de9dec58c7c186ea5ecd5c6138545102 100644 (file)
@@ -1,8 +1,8 @@
+#include "message.h"
 #include <cstdlib>
 #include <msp/core/maputils.h>
 #include <msp/strings/format.h>
 #include <msp/strings/utils.h>
-#include "message.h"
 
 using namespace std;
 
index 15056d60d9a7d82f32ad180ea819170ac4549086..437b8ba6aff4ab476d3388192d3db7aa78fbdfab 100644 (file)
@@ -1,7 +1,7 @@
+#include "request.h"
 #include <msp/strings/format.h>
 #include <msp/strings/regex.h>
 #include <msp/strings/utils.h>
-#include "request.h"
 #include "utils.h"
 
 using namespace std;
index 6fa4cc333a58d6c4bee716987428310bdc6daf85..6005d35ae6e1e26bf62837262485302e5d3df117 100644 (file)
@@ -1,6 +1,6 @@
+#include "response.h"
 #include <msp/strings/format.h>
 #include <msp/strings/utils.h>
-#include "response.h"
 
 using namespace std;
 
index 066fabe39218a47fe5a58de05450c696c110888d..9c9a876a411bd28616922edef1f535f5df4cb525 100644 (file)
@@ -1,3 +1,4 @@
+#include "server.h"
 #include <exception>
 #include <typeinfo>
 #include <msp/core/maputils.h>
@@ -9,7 +10,6 @@
 #include <msp/strings/utils.h>
 #include "request.h"
 #include "response.h"
-#include "server.h"
 
 using namespace std;
 
index 8662c2ec4176c452472d1c6984fd13f489b70d1f..8aa966cd09fc88a45092d46b4d37e72323beb9c3 100644 (file)
@@ -1,8 +1,8 @@
+#include "utils.h"
 #include <algorithm>
 #include <msp/strings/format.h>
 #include <msp/strings/regex.h>
 #include <msp/strings/utils.h>
-#include "utils.h"
 
 using namespace std;
 
index c9fd1c91bd83c4d352c36fdbce9e7c8770c18fb9..d6f846c68c80fc30b118f96a6e4fa025aa2ea5db 100644 (file)
@@ -1,7 +1,7 @@
+#include "version.h"
 #include <msp/strings/format.h>
 #include <msp/strings/lexicalcast.h>
 #include <msp/strings/regex.h>
-#include "version.h"
 
 using namespace std;
 
index e6e10e9af3047384af78186513da9e21c05acde2..fbbd2415c693911b88063f0091600d0d3e73f25a 100644 (file)
@@ -1,6 +1,6 @@
 #include "platform_api.h"
-#include <msp/core/systemerror.h>
 #include "clientsocket.h"
+#include <msp/core/systemerror.h>
 #include "socket_private.h"
 
 namespace Msp {
index 3ac62d7e4be0906f270582ddd2576f32b346a381..51202b5f659c07b733e5e93dbb3750142b4b884e 100644 (file)
@@ -1,5 +1,5 @@
-#include <cstring>
 #include "communicator.h"
+#include <cstring>
 #include "streamsocket.h"
 
 using namespace std;
index 5088e51953fcd5046b4cdbacb10ef496dd8a3571..4de22b42cdb44919857ed12dbe76102fd67bd5a6 100644 (file)
@@ -1,6 +1,6 @@
-#include <stdexcept>
 #include "platform_api.h"
 #include "constants.h"
+#include <stdexcept>
 
 using namespace std;
 
index 7ee057f6a999d8924a7ada720939aaabbe54265e..54935545bbf984629602498c6d162d0e7170f75b 100644 (file)
@@ -1,8 +1,8 @@
 #include "platform_api.h"
+#include "datagramsocket.h"
 #include <msp/core/systemerror.h>
 #include <msp/io/handle_private.h>
 #include <msp/strings/format.h>
-#include "datagramsocket.h"
 #include "sockaddr_private.h"
 #include "socket_private.h"
 
index dbbd12d7e5e7e65cb5292a1c5b04592b29cf4c4f..f44b1c0b08f0184ed3774e4da25018934b42bdea 100644 (file)
@@ -1,6 +1,6 @@
 #include "platform_api.h"
-#include <msp/strings/format.h>
 #include "inet.h"
+#include <msp/strings/format.h>
 #include "sockaddr_private.h"
 
 using namespace std;
index 8ddf1d5cb52248e771dc3e602f75c45f6de16700..758005860582dc968ef2064e6d2047e19376fe5c 100644 (file)
@@ -1,6 +1,6 @@
+#include "inet6.h"
 #include "platform_api.h"
 #include <msp/strings/format.h>
-#include "inet6.h"
 #include "sockaddr_private.h"
 
 using namespace std;
index 402b84a0633cdeb4dbe45c463e2f9676af911709..63cc6f16c1dac82b14baebad1b4556f245c1b147 100644 (file)
@@ -1,9 +1,9 @@
+#include "protocol.h"
 #include <cstring>
 #include <string>
 #include <msp/core/maputils.h>
 #include <msp/strings/format.h>
 #include <msp/strings/lexicalcast.h>
-#include "protocol.h"
 
 using namespace std;
 
index 078d6ef3125be2dc20fa703f9a407de7230cc776..9ec5395df99c5b2504965dbb998029d0933f7a30 100644 (file)
@@ -1,9 +1,9 @@
-#include "platform_api.h"
+#include "resolve.h"
 #include <msp/core/systemerror.h>
 #include <msp/strings/format.h>
+#include "platform_api.h"
 #include "sockaddr_private.h"
 #include "socket.h"
-#include "resolve.h"
 
 using namespace std;
 
index 01fa445f41095e557995247fb265e3567116cb35..66876c534fcbf73e2317527b95eb03554a034174 100644 (file)
@@ -1,5 +1,5 @@
-#include <msp/core/except.h>
 #include "serversocket.h"
+#include <msp/core/except.h>
 
 using namespace std;
 
index 36e9c6882542eebc92f0e8edb3dc8e37255e8338..6ac9189359d1e02b1358d4a73e88ec338fb89824 100644 (file)
@@ -1,3 +1,4 @@
+#include "sockaddr.h"
 #include <stdexcept>
 #include "platform_api.h"
 #include "inet.h"
index 877c1da2b99a31d586b9f5832717411cee96d625..84db6375c5c7b96c0db0a211e6ff201f527a0c49 100644 (file)
@@ -1,8 +1,8 @@
 #include "platform_api.h"
+#include "socket.h"
 #include <msp/core/systemerror.h>
 #include <msp/io/handle_private.h>
 #include "sockaddr_private.h"
-#include "socket.h"
 #include "socket_private.h"
 
 using namespace std;
index b91491dcdd542e034ef6c35e3e00379abe019f7c..8e655fc47ec08ddc6ed90640598959a81b31d49b 100644 (file)
@@ -1,11 +1,11 @@
 #include "platform_api.h"
+#include "streamserversocket.h"
 #include <msp/core/refptr.h>
 #include <msp/core/systemerror.h>
 #include <msp/io/handle_private.h>
 #include <msp/strings/format.h>
 #include "sockaddr_private.h"
 #include "socket_private.h"
-#include "streamserversocket.h"
 #include "streamsocket.h"
 
 using namespace std;
index 02a7b54ede3c6591031c4eac7b16ff7b478f7044..9e2d79afe7e1b27dd87d81c5a6b2f7db2f6103b6 100644 (file)
@@ -1,11 +1,11 @@
 #include "platform_api.h"
+#include "streamsocket.h"
 #include <msp/core/systemerror.h>
 #include <msp/io/handle_private.h>
 #include <msp/io/poll.h>
 #include <msp/strings/format.h>
 #include "sockaddr_private.h"
 #include "socket_private.h"
-#include "streamsocket.h"
 
 namespace Msp {
 namespace Net {
index b8cc580f0040f7f16c1bf8adbc4668dce5a2c6ec..d87cdd3a72907109133929d5b8a405e6237cc2cf 100644 (file)
@@ -1,12 +1,12 @@
+#include "platform_api.h"
+#include "socket.h"
 #include <cerrno>
 #include <unistd.h>
 #include <fcntl.h>
-#include "platform_api.h"
 #include <msp/core/systemerror.h>
 #include <msp/io/handle_private.h>
 #include <msp/time/rawtime_private.h>
 #include "sockaddr_private.h"
-#include "socket.h"
 #include "socket_private.h"
 
 using namespace std;
index eba7fb6425fa36acf825126bd73310586f6db373..648d53a303a946f5dc64e1be09481142f573f36c 100644 (file)
@@ -1,8 +1,8 @@
+#include "platform_api.h"
+#include "unix.h"
 #include <stdexcept>
 #include <sys/un.h>
-#include "platform_api.h"
 #include "sockaddr_private.h"
-#include "unix.h"
 
 using namespace std;
 
index dfcff623c328f4f03b2a7129a1931891a80c140b..07db95d1f7dd928ab357d645754a05d4b899a6b4 100644 (file)
@@ -1,9 +1,9 @@
-#include <iostream>
 #include "platform_api.h"
+#include "socket.h"
+#include <iostream>
 #include <msp/core/systemerror.h>
 #include <msp/io/handle_private.h>
 #include "sockaddr_private.h"
-#include "socket.h"
 #include "socket_private.h"
 
 using namespace std;
index 6a56ee0b8357a68b4a5851ac40107d9172672a4a..b38a258b24421f208f42e7366d1552bd401e204c 100644 (file)
@@ -1,7 +1,7 @@
-#include <msp/core/except.h>
 #include "platform_api.h"
-#include "sockaddr_private.h"
 #include "unix.h"
+#include <msp/core/except.h>
+#include "sockaddr_private.h"
 
 using namespace std;