mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Uninline constructors to reduce GetInstance() inlined code size.
This commit is contained in:
@@ -30,6 +30,9 @@ void Dispatcher::StartClient(const char* server_name, unsigned int port) {
|
||||
static_cast<int>(port), 1));
|
||||
}
|
||||
|
||||
Dispatcher::Dispatcher()
|
||||
: Dispatcher(Storage::GetInstance(), Notifier::GetInstance()) {}
|
||||
|
||||
DispatcherBase::DispatcherBase(Storage& storage, Notifier& notifier)
|
||||
: m_storage(storage), m_notifier(notifier) {
|
||||
m_active = false;
|
||||
|
||||
@@ -114,7 +114,7 @@ class Dispatcher : public DispatcherBase {
|
||||
void StartClient(const char* server_name, unsigned int port);
|
||||
|
||||
private:
|
||||
Dispatcher() : Dispatcher(Storage::GetInstance(), Notifier::GetInstance()) {}
|
||||
Dispatcher();
|
||||
Dispatcher(Storage& storage, Notifier& notifier)
|
||||
: DispatcherBase(storage, notifier) {}
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ using namespace nt;
|
||||
|
||||
ATOMIC_STATIC_INIT(Storage)
|
||||
|
||||
Storage::Storage()
|
||||
: Storage(Notifier::GetInstance(), RpcServer::GetInstance()) {}
|
||||
|
||||
Storage::Storage(Notifier& notifier, RpcServer& rpc_server)
|
||||
: m_notifier(notifier), m_rpc_server(rpc_server) {
|
||||
m_terminating = false;
|
||||
|
||||
@@ -99,7 +99,7 @@ class Storage {
|
||||
bool GetRpcResult(bool blocking, unsigned int call_uid, std::string* result);
|
||||
|
||||
private:
|
||||
Storage() : Storage(Notifier::GetInstance(), RpcServer::GetInstance()) {}
|
||||
Storage();
|
||||
Storage(Notifier& notifier, RpcServer& rpcserver);
|
||||
Storage(const Storage&) = delete;
|
||||
Storage& operator=(const Storage&) = delete;
|
||||
|
||||
Reference in New Issue
Block a user