deleted unused copy constructors in peers

pull/1/head
Tom Early 5 years ago
parent 23d39e4594
commit d19444c911

@ -50,24 +50,6 @@ CBmPeer::CBmPeer(const CCallsign &callsign, const CIp &ip, const char *modules,
} }
} }
CBmPeer::CBmPeer(const CBmPeer &peer)
: CPeer(peer)
{
for ( auto it=peer.cbegin(); it!=peer.cend(); it++ )
{
std::shared_ptr<CBmClient> client(new CBmClient((const CBmClient &)*(*it)));
m_Clients.push_back(client);
}
}
////////////////////////////////////////////////////////////////////////////////////////
// destructors
CBmPeer::~CBmPeer()
{
}
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
// status // status

@ -42,18 +42,15 @@ public:
// constructors // constructors
CBmPeer(); CBmPeer();
CBmPeer(const CCallsign &, const CIp &, const char *, const CVersion &); CBmPeer(const CCallsign &, const CIp &, const char *, const CVersion &);
CBmPeer(const CBmPeer &); CBmPeer(const CBmPeer &) = delete;
// destructor
~CBmPeer();
// status // status
bool IsAlive(void) const; bool IsAlive(void) const;
// identity // identity
int GetProtocol(void) const { return PROTOCOL_XLX; } int GetProtocol(void) const { return PROTOCOL_XLX; }
const char *GetProtocolName(void) const { return "XLX"; } const char *GetProtocolName(void) const { return "XLX"; }
// revision helper // revision helper
static int GetProtocolRevision(const CVersion &); static int GetProtocolRevision(const CVersion &);
}; };

@ -51,24 +51,6 @@ CDextraPeer::CDextraPeer(const CCallsign &callsign, const CIp &ip, const char *m
} }
} }
CDextraPeer::CDextraPeer(const CDextraPeer &peer)
: CPeer(peer)
{
for ( auto it=peer.cbegin(); it!=peer.cend(); it++ )
{
std::shared_ptr<CDextraClient> client(new CDextraClient((const CDextraClient &)*(*it)));
m_Clients.push_back(client);
}
}
////////////////////////////////////////////////////////////////////////////////////////
// destructors
CDextraPeer::~CDextraPeer()
{
}
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
// status // status

@ -41,18 +41,15 @@ public:
// constructors // constructors
CDextraPeer(); CDextraPeer();
CDextraPeer(const CCallsign &, const CIp &, const char *, const CVersion &); CDextraPeer(const CCallsign &, const CIp &, const char *, const CVersion &);
CDextraPeer(const CDextraPeer &); CDextraPeer(const CDextraPeer &) = delete;
// destructor
~CDextraPeer();
// status // status
bool IsAlive(void) const; bool IsAlive(void) const;
// identity // identity
int GetProtocol(void) const { return PROTOCOL_DEXTRA; } int GetProtocol(void) const { return PROTOCOL_DEXTRA; }
const char *GetProtocolName(void) const { return "DExtra"; } const char *GetProtocolName(void) const { return "DExtra"; }
// revision helper // revision helper
static int GetProtocolRevision(const CVersion &); static int GetProtocolRevision(const CVersion &);
}; };

@ -52,17 +52,6 @@ CPeer::CPeer(const CCallsign &callsign, const CIp &ip, const char *modules, cons
m_LastHeardTime = std::time(nullptr); m_LastHeardTime = std::time(nullptr);
} }
CPeer::CPeer(const CPeer &peer)
{
m_Callsign = peer.m_Callsign;
m_Ip = peer.m_Ip;
::memcpy(m_ReflectorModules, peer.m_ReflectorModules, sizeof(m_ReflectorModules));
m_Version = peer.m_Version;
m_LastKeepaliveTime = peer.m_LastKeepaliveTime;
m_ConnectTime = peer.m_ConnectTime;
m_LastHeardTime = peer.m_LastHeardTime;
}
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
// destructors // destructors

@ -44,7 +44,7 @@ public:
// constructors // constructors
CPeer(); CPeer();
CPeer(const CCallsign &, const CIp &, const char *, const CVersion &); CPeer(const CCallsign &, const CIp &, const char *, const CVersion &);
CPeer(const CPeer &); CPeer(const CPeer &) = delete;
// destructor // destructor
virtual ~CPeer(); virtual ~CPeer();

@ -53,23 +53,6 @@ CXlxPeer::CXlxPeer(const CCallsign &callsign, const CIp &ip, const char *modules
} }
} }
CXlxPeer::CXlxPeer(const CXlxPeer &peer)
: CPeer(peer)
{
for ( auto it=peer.cbegin(); it!=peer.cend(); it++ )
{
std::shared_ptr<CXlxClient> client(new CXlxClient((const CXlxClient &)*(*it)));
m_Clients.push_back(client);
}
}
////////////////////////////////////////////////////////////////////////////////////////
// destructors
CXlxPeer::~CXlxPeer()
{
}
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
// status // status

@ -41,18 +41,15 @@ public:
// constructors // constructors
CXlxPeer(); CXlxPeer();
CXlxPeer(const CCallsign &, const CIp &, const char *, const CVersion &); CXlxPeer(const CCallsign &, const CIp &, const char *, const CVersion &);
CXlxPeer(const CXlxPeer &); CXlxPeer(const CXlxPeer &) = delete;
// destructor
~CXlxPeer();
// status // status
bool IsAlive(void) const; bool IsAlive(void) const;
// identity // identity
int GetProtocol(void) const { return PROTOCOL_XLX; } int GetProtocol(void) const { return PROTOCOL_XLX; }
const char *GetProtocolName(void) const { return "XLX"; } const char *GetProtocolName(void) const { return "XLX"; }
// revision helper // revision helper
static int GetProtocolRevision(const CVersion &); static int GetProtocolRevision(const CVersion &);
}; };

@ -4,6 +4,7 @@
// //
// Created by Jean-Luc Deltombe (LX3JL) on 31/10/2015. // Created by Jean-Luc Deltombe (LX3JL) on 31/10/2015.
// Copyright © 2015 Jean-Luc Deltombe (LX3JL). All rights reserved. // Copyright © 2015 Jean-Luc Deltombe (LX3JL). All rights reserved.
// Copyright © 2020 Thomas A. Eary, N7TAE
// //
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// This file is part of xlxd. // This file is part of xlxd.

Loading…
Cancel
Save

Powered by TurnKey Linux.