From 7074f35e4ba831e358117842b99ee35b87f85ae5 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 15:58:20 +0700 Subject: shared_ptr -> std::shared_ptr This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today. --- .../Durango/Network/ChatIntegrationLayer.h | 60 +++++++++++----------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'Minecraft.Client/Durango/Network/ChatIntegrationLayer.h') diff --git a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h index 80b4e10a..4470a22b 100644 --- a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h +++ b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h @@ -16,7 +16,7 @@ enum ChatPacketType OutgoingPacket = 1 }; -class ChatIntegrationLayer +class ChatIntegrationLayer : public std::enable_shared_from_this // shared_from_this is needed to use a weak ref to 'this' when handling delegate callbacks { public: @@ -26,7 +26,7 @@ public: /// /// Initializes the chat manager /// - void InitializeChatManager( + void InitializeChatManager( __in bool combineCaptureBuffersIntoSinglePacketEnabled, __in bool useKinectAsCaptureSource, __in bool applySoundEffectToCapture, @@ -47,8 +47,8 @@ public: bool m_canCaptureAudio; }; - void AddLocalUser( __in Windows::Xbox::System::IUser^ user ); - void RemoveLocalUser( __in Windows::Xbox::System::IUser^ user ); + void AddLocalUser( __in Windows::Xbox::System::IUser^ user ); + void RemoveLocalUser( __in Windows::Xbox::System::IUser^ user ); void EvaluateDevicesForUser(__in Windows::Xbox::System::IUser^ user ); vector m_addedUsers; @@ -57,18 +57,18 @@ public: private: /// /// Adds a local user to a specific channel - /// This is helper function waits for the task to complete so shouldn't be called from the UI thread + /// This is helper function waits for the task to complete so shouldn't be called from the UI thread /// /// The channel to add the user to /// The local user to add - void AddLocalUserToChatChannel( + void AddLocalUserToChatChannel( __in uint8 channelIndex, __in Windows::Xbox::System::IUser^ user - ); + ); /// /// Removes a local user from a specific channel - /// This is helper function waits for the task to complete so shouldn't be called from the UI thread + /// This is helper function waits for the task to complete so shouldn't be called from the UI thread /// /// The channel to remove the user from /// The local user to remove @@ -80,10 +80,10 @@ public: /// /// Removes a remote console from chat - /// This is helper function waits for the task to complete so shouldn't be called from the UI thread + /// This is helper function waits for the task to complete so shouldn't be called from the UI thread /// /// A unique ID for the remote console - void RemoveRemoteConsole( + void RemoveRemoteConsole( unsigned int address ); @@ -92,7 +92,7 @@ public: /// /// A buffer containing the chat message /// A unique ID for the remote console - void OnIncomingChatMessage( + void OnIncomingChatMessage( unsigned int sessionAddress, Platform::Array^ message ); @@ -111,7 +111,7 @@ public: /// Helper function to swap the mute state of a specific chat user /// void ChangeChatUserMuteState( - __in Microsoft::Xbox::GameChat::ChatUser^ chatUser + __in Microsoft::Xbox::GameChat::ChatUser^ chatUser ); /// @@ -120,20 +120,20 @@ public: void HandleChatChannelChanged( __in uint8 oldChatChannelIndex, __in uint8 newChatChannelIndex, - __in Microsoft::Xbox::GameChat::ChatUser^ chatUser + __in Microsoft::Xbox::GameChat::ChatUser^ chatUser ); /// - /// Call this when a new console connects. + /// Call this when a new console connects. /// This adds this console to the chat layer /// - void OnNewSessionAddressAdded( - __in unsigned int address + void OnNewSessionAddressAdded( + __in unsigned int address ); /// /// Adds a list of locally signed in users that have intent to play to the chat session on a specific channel index. - /// Avoid adding any user who is signed in that doesn't have intent to play otherwise users who are biometrically + /// Avoid adding any user who is signed in that doesn't have intent to play otherwise users who are biometrically /// signed in automatically will be added to the chat session /// /// The channel to add the users to @@ -147,8 +147,8 @@ public: /// Handles when a debug message is received. Send this to the UI and OutputDebugString. Games should integrate with their existing log system. /// /// Contains the debug message to log - void OnDebugMessageReceived( - __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args + void OnDebugMessageReceived( + __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args ); /// @@ -161,8 +161,8 @@ public: /// It should send the chat message in order (if that feature is available) if args->SendInOrder is true /// /// Describes the packet to send - void OnOutgoingChatPacketReady( - __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args + void OnOutgoingChatPacketReady( + __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args ); /// @@ -189,13 +189,13 @@ public: /// /// Helper function to get specific ChatUser by xboxUserId /// - bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers( - __in Platform::Object^ uniqueRemoteConsoleIdentifier1, - __in Platform::Object^ uniqueRemoteConsoleIdentifier2 + bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers( + __in Platform::Object^ uniqueRemoteConsoleIdentifier1, + __in Platform::Object^ uniqueRemoteConsoleIdentifier2 ); /// - /// Helper function to return the ChatPerformanceCounters^ from the ChatManager so perf numbers can be shown on the UI + /// Helper function to return the ChatPerformanceCounters^ from the ChatManager so perf numbers can be shown on the UI /// These numbers will only be valid if m_chatManager->ChatSettings->PerformanceCountersEnabled is set to true. /// Microsoft::Xbox::GameChat::ChatPerformanceCounters^ GetChatPerformanceCounters(); @@ -204,13 +204,13 @@ public: /// Returns a count of the number of chat packets of a specific type that have been either sent or received. /// It is useful to monitor this number in the UI / logs to debug network issues. /// - int GameUI_GetPacketStatistic( + int GameUI_GetPacketStatistic( __in Microsoft::Xbox::GameChat::ChatMessageType messageType, __in ChatPacketType chatPacketType ); - - void OnControllerPairingChanged( - __in Windows::Xbox::Input::ControllerPairingChangedEventArgs^ args + + void OnControllerPairingChanged( + __in Windows::Xbox::Input::ControllerPairingChangedEventArgs^ args ); void ToggleRenderTargetVolume(); @@ -233,7 +233,7 @@ private: // Debug stats for chat packets. Use Debug_GetPacketStatistic() to get the values. /// It is useful to monitor this number in the UI / logs to debug network issues. - void GameUI_RecordPacketStatistic( + void GameUI_RecordPacketStatistic( __in Microsoft::Xbox::GameChat::ChatMessageType messageType, __in ChatPacketType chatPacketType ); -- cgit v1.2.3