diff options
Diffstat (limited to 'Minecraft.Client/Common/Network/SessionInfo.h')
| -rw-r--r-- | Minecraft.Client/Common/Network/SessionInfo.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/Minecraft.Client/Common/Network/SessionInfo.h b/Minecraft.Client/Common/Network/SessionInfo.h index ce6365bc..7b3629ff 100644 --- a/Minecraft.Client/Common/Network/SessionInfo.h +++ b/Minecraft.Client/Common/Network/SessionInfo.h @@ -119,9 +119,36 @@ public: hasPartyMember = false; } + FriendSessionInfo(const FriendSessionInfo& other) + { + sessionId = other.sessionId; +#ifdef _XBOX + searchResult = other.searchResult; +#elif defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) + searchResult = other.searchResult; +#elif defined(_DURANGO) + searchResult = other.searchResult; +#endif + displayLabelLength = other.displayLabelLength; + displayLabelViewableStartIndex = other.displayLabelViewableStartIndex; + data = other.data; + hasPartyMember = other.hasPartyMember; + if (other.displayLabel != NULL) + { + displayLabel = new wchar_t[displayLabelLength + 1]; + wcscpy_s(displayLabel, displayLabelLength + 1, other.displayLabel); + } + else + { + displayLabel = NULL; + } + } + + FriendSessionInfo& operator=(const FriendSessionInfo&) = delete; + ~FriendSessionInfo() { if (displayLabel != NULL) - delete displayLabel; + delete[] displayLabel; } }; |
