mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
HAND FIXES: Manual cleanup of namespaces
This commit is contained in:
committed by
Peter Johnson
parent
ad138270a8
commit
3f740894c9
4
wpinet/robotpy_pybind_build_info.bzl
generated
4
wpinet/robotpy_pybind_build_info.bzl
generated
@@ -13,7 +13,7 @@ def wpinet_extension(srcs = [], header_to_dat_deps = [], extra_hdrs = [], includ
|
||||
header_file = "$(execpath :robotpy-native-wpinet.copy_headers)/wpi/net/PortForwarder.hpp",
|
||||
tmpl_class_names = [],
|
||||
trampolines = [
|
||||
("wpi::PortForwarder", "wpi__PortForwarder.hpp"),
|
||||
("wpi::net::PortForwarder", "wpi__net__PortForwarder.hpp"),
|
||||
],
|
||||
),
|
||||
struct(
|
||||
@@ -23,7 +23,7 @@ def wpinet_extension(srcs = [], header_to_dat_deps = [], extra_hdrs = [], includ
|
||||
header_file = "$(execpath :robotpy-native-wpinet.copy_headers)/wpi/net/WebServer.hpp",
|
||||
tmpl_class_names = [],
|
||||
trampolines = [
|
||||
("wpi::WebServer", "wpi__WebServer.hpp"),
|
||||
("wpi::net::WebServer", "wpi__net__WebServer.hpp"),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
||||
@@ -10,10 +10,11 @@
|
||||
|
||||
#include "wpi/util/Signal.h"
|
||||
|
||||
namespace wpi::net {
|
||||
|
||||
namespace wpi::util {
|
||||
class Logger;
|
||||
}
|
||||
|
||||
namespace wpi::net {
|
||||
namespace uv {
|
||||
class Loop;
|
||||
class Tcp;
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
#include "wpi/net/HttpParser.hpp"
|
||||
#include "wpi/net/uv/Stream.hpp"
|
||||
|
||||
namespace wpi::net {
|
||||
|
||||
namespace wpi::util {
|
||||
class raw_ostream;
|
||||
}
|
||||
|
||||
namespace wpi::net {
|
||||
|
||||
class HttpServerConnection {
|
||||
public:
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
|
||||
#include "wpi/net/uv/Timer.hpp"
|
||||
|
||||
namespace wpi::net {
|
||||
|
||||
namespace wpi::util {
|
||||
class Logger;
|
||||
}
|
||||
|
||||
namespace wpi::net {
|
||||
namespace uv {
|
||||
class GetAddrInfoReq;
|
||||
class Loop;
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
#include "wpi/util/SmallVector.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
namespace wpi::net {
|
||||
|
||||
namespace wpi::util {
|
||||
class Logger;
|
||||
}
|
||||
|
||||
namespace wpi::net {
|
||||
class UDPClient {
|
||||
int m_lsd;
|
||||
int m_port;
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
namespace wpi::net {
|
||||
namespace wpi::util {
|
||||
template <typename T>
|
||||
class SmallVectorImpl;
|
||||
}
|
||||
|
||||
namespace wpi::net {
|
||||
std::string GetHostname();
|
||||
std::string_view GetHostname(wpi::util::SmallVectorImpl<char>& name);
|
||||
} // namespace wpi::net
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "wpi/net/uv/Loop.hpp"
|
||||
#include "wpi/util/Signal.h"
|
||||
|
||||
namespace wpi::net {
|
||||
namespace wpi::util {
|
||||
class Logger;
|
||||
} // namespace wpi::net
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ void ResolverThread::RemoveServiceRefInThread(DNSServiceRef serviceRef) {
|
||||
WPI_EventHandle ResolverThread::RemoveServiceRefOutsideThread(
|
||||
DNSServiceRef serviceRef) {
|
||||
std::scoped_lock lock{serviceRefMutex};
|
||||
WPI_EventHandle handle = CreateEvent(true);
|
||||
WPI_EventHandle handle = wpi::util::CreateEvent(true);
|
||||
serviceRefsToRemove.push_back({serviceRef, handle});
|
||||
return handle;
|
||||
}
|
||||
|
||||
@@ -32,10 +32,11 @@
|
||||
#include "wpi/net/NetworkAcceptor.hpp"
|
||||
#include "wpi/net/TCPStream.h"
|
||||
|
||||
namespace wpi::net {
|
||||
|
||||
namespace wpi::util {
|
||||
class Logger;
|
||||
}
|
||||
|
||||
namespace wpi::net {
|
||||
class TCPAcceptor : public NetworkAcceptor {
|
||||
int m_lsd;
|
||||
int m_port;
|
||||
|
||||
@@ -30,10 +30,11 @@
|
||||
|
||||
#include "wpi/net/NetworkStream.hpp"
|
||||
|
||||
namespace wpi::net {
|
||||
|
||||
namespace wpi::util {
|
||||
class Logger;
|
||||
}
|
||||
|
||||
namespace wpi::net {
|
||||
class TCPConnector {
|
||||
public:
|
||||
static std::unique_ptr<NetworkStream> connect(const char* server, int port,
|
||||
|
||||
@@ -36,8 +36,8 @@ TEST(WorkerThreadTest, FutureVoid) {
|
||||
}
|
||||
|
||||
TEST(WorkerThreadTest, Loop) {
|
||||
mutex m;
|
||||
condition_variable cv;
|
||||
wpi::util::mutex m;
|
||||
wpi::util::condition_variable cv;
|
||||
int callbacks = 0;
|
||||
|
||||
WorkerThread<int(bool)> worker;
|
||||
@@ -60,8 +60,8 @@ TEST(WorkerThreadTest, Loop) {
|
||||
}
|
||||
|
||||
TEST(WorkerThreadTest, LoopVoid) {
|
||||
mutex m;
|
||||
condition_variable cv;
|
||||
wpi::util::mutex m;
|
||||
wpi::util::condition_variable cv;
|
||||
int callbacks = 0;
|
||||
|
||||
WorkerThread<void(bool)> worker;
|
||||
|
||||
Reference in New Issue
Block a user