Skip to content

Commit 7c0d0ce

Browse files
author
Alexandre jublot
committed
feat: added copy constructor on SessionStore
1 parent 5d34b43 commit 7c0d0ce

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

include/Polymorph/Network/SessionStore.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ namespace polymorph::network
2424
////////////////////// CONSTRUCTORS/DESTRUCTORS /////////////////////////
2525

2626
public:
27+
SessionStore() = default;
28+
SessionStore(const SessionStore &);
29+
30+
~SessionStore() = default;
2731

2832

2933
//////////////////////--------------------------/////////////////////////

src/src/SessionStore.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,10 @@ polymorph::network::SessionId polymorph::network::SessionStore::_findAvailableUd
188188
++i;
189189
return i;
190190
}
191+
192+
polymorph::network::SessionStore::SessionStore(const polymorph::network::SessionStore &other)
193+
: _udpSessions(other._udpSessions), _tcpSessions(other._tcpSessions),
194+
_udpSessionsAuthorizationKeys(other._udpSessionsAuthorizationKeys), _tcpSessionsAuthorizationKeys(other._tcpSessionsAuthorizationKeys)
195+
{
196+
197+
}

0 commit comments

Comments
 (0)