From e7f1519ab22c76f7e4611727ec93c4c145b585a1 Mon Sep 17 00:00:00 2001 From: badaix Date: Thu, 9 Dec 2021 13:52:53 +0100 Subject: [PATCH] Cleanup namespaces --- client/snapclient.cpp | 2 ++ server/control_session.hpp | 3 --- server/control_session_http.cpp | 1 + server/control_session_http.hpp | 4 ++-- server/control_session_tcp.hpp | 3 +++ server/control_session_ws.hpp | 1 - server/snapserver.cpp | 1 + 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client/snapclient.cpp b/client/snapclient.cpp index cadb6988..68aa382e 100644 --- a/client/snapclient.cpp +++ b/client/snapclient.cpp @@ -47,6 +47,8 @@ #include "common/version.hpp" // #include "metadata.hpp" +#include +#include using namespace std; using namespace popl; diff --git a/server/control_session.hpp b/server/control_session.hpp index eebf3a0d..d3c49cb2 100644 --- a/server/control_session.hpp +++ b/server/control_session.hpp @@ -29,9 +29,6 @@ #include #include -using boost::asio::ip::tcp; -namespace net = boost::asio; - class ControlSession; class StreamSession; diff --git a/server/control_session_http.cpp b/server/control_session_http.cpp index afe38d5c..385b3197 100644 --- a/server/control_session_http.cpp +++ b/server/control_session_http.cpp @@ -26,6 +26,7 @@ #include using namespace std; +namespace websocket = beast::websocket; // from static constexpr auto LOG_TAG = "ControlSessionHTTP"; diff --git a/server/control_session_http.hpp b/server/control_session_http.hpp index 11bcfbdc..41500537 100644 --- a/server/control_session_http.hpp +++ b/server/control_session_http.hpp @@ -31,10 +31,10 @@ #endif #include +using boost::asio::ip::tcp; + namespace beast = boost::beast; // from namespace http = beast::http; // from -namespace websocket = beast::websocket; // from -namespace net = boost::asio; // from /// Endpoint for a connected control client. diff --git a/server/control_session_tcp.hpp b/server/control_session_tcp.hpp index 738532ed..f3056a04 100644 --- a/server/control_session_tcp.hpp +++ b/server/control_session_tcp.hpp @@ -22,6 +22,9 @@ #include "control_session.hpp" #include +using boost::asio::ip::tcp; +namespace net = boost::asio; + /// Endpoint for a connected control client. /** * Endpoint for a connected control client. diff --git a/server/control_session_ws.hpp b/server/control_session_ws.hpp index 26381901..574186b2 100644 --- a/server/control_session_ws.hpp +++ b/server/control_session_ws.hpp @@ -25,7 +25,6 @@ #include namespace beast = boost::beast; // from -namespace http = beast::http; // from namespace websocket = beast::websocket; // from namespace net = boost::asio; // from diff --git a/server/snapserver.cpp b/server/snapserver.cpp index 4fdcee5b..2072240a 100644 --- a/server/snapserver.cpp +++ b/server/snapserver.cpp @@ -39,6 +39,7 @@ #include "common/aixlog.hpp" #include "config.hpp" +#include using namespace std; using namespace popl;