From 28614b922fb77149a54da1a87bebfbc98736f296 Mon Sep 17 00:00:00 2001 From: ModMaker101 <119018978+ModMaker101@users.noreply.github.com> Date: Sun, 8 Mar 2026 19:08:36 -0400 Subject: Modernize project codebase (#906) * Fixed boats falling and a TP glitch #266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch #266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides * Add safety checks and fix a issue with vector going OOR --- .../Xbox/Sentient/Include/SenClientAvatar.h | 18 +++++----- .../Xbox/Sentient/Include/SenClientBoxArt.h | 38 +++++++++++----------- .../Xbox/Sentient/Include/SenClientConfig.h | 4 +-- .../Xbox/Sentient/Include/SenClientCore.h | 2 +- .../SenClientCultureBackCompat_SenClientUGC.h | 4 +-- .../Xbox/Sentient/Include/SenClientDynamicConfig.h | 8 ++--- .../Xbox/Sentient/Include/SenClientFame.h | 24 +++++++------- .../Xbox/Sentient/Include/SenClientResource.h | 10 +++--- .../Xbox/Sentient/Include/SenClientUGC.h | 10 +++--- .../Xbox/Sentient/Include/SenClientUser.h | 4 +-- 10 files changed, 61 insertions(+), 61 deletions(-) (limited to 'Minecraft.Client/Xbox/Sentient/Include') diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientAvatar.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientAvatar.h index dfccfd3b..524c1bdc 100644 --- a/Minecraft.Client/Xbox/Sentient/Include/SenClientAvatar.h +++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientAvatar.h @@ -108,7 +108,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call. - /// E_POINTER: out_avatarInfoList is NULL. + /// E_POINTER: out_avatarInfoList is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -149,7 +149,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call. - /// E_POINTER: out_avatarInfo is NULL. + /// E_POINTER: out_avatarInfo is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -192,7 +192,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// E_INVALIDARG: avatarInfo.resourceID or avatarInfo.[fe]male.metadata is invalid. - /// E_POINTER: out_data is NULL. + /// E_POINTER: out_data is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -235,7 +235,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// E_INVALIDARG: avatarInfo.resourceID or avatarInfo.[fe]male.assets is invalid. - /// E_POINTER: out_data is NULL. + /// E_POINTER: out_data is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -278,7 +278,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// E_INVALIDARG: avatarInfo.resourceID or avatarInfo.[fe]male.icon is invalid. - /// E_POINTER: out_data is NULL. + /// E_POINTER: out_data is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -316,7 +316,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// E_INVALIDARG: avatarInfo.resourceID or avatarInfo.xml is invalid. - /// E_POINTER: out_avatarExtraInfo is NULL. + /// E_POINTER: out_avatarExtraInfo is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -352,14 +352,14 @@ namespace Sentient // First method, filling a fixed-size buffer: // // wchar_t buffer[1234]; - // SenAvatarXMLGetTitle( xml, loc, _countof(buffer), NULL, buffer ); + // SenAvatarXMLGetTitle( xml, loc, _countof(buffer), nullptr, buffer ); // // Second method, filling a dynamically-allocated buffer: // // size_t bufferLength; - // SenAvatarXMLGetTitle( xml, loc, 0, &bufferLength, NULL ); + // SenAvatarXMLGetTitle( xml, loc, 0, &bufferLength, nullptr ); // wchar_t buffer = new wchar_t[bufferLength]; - // SenAvatarXMLGetTitle( xml, loc, bufferLength, NULL, buffer ); + // SenAvatarXMLGetTitle( xml, loc, bufferLength, nullptr, buffer ); // // Note that bufferLength is in wchars, and includes the terminating nul. // The actual length of the _string_ is (*out_bufferLength - 1). diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientBoxArt.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientBoxArt.h index 09662243..95a8c188 100644 --- a/Minecraft.Client/Xbox/Sentient/Include/SenClientBoxArt.h +++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientBoxArt.h @@ -116,7 +116,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call. - /// E_POINTER: out_boxArtInfoList is NULL. + /// E_POINTER: out_boxArtInfoList is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -160,7 +160,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// E_INVALIDARG: boxArtInfo.resourceID or boxArtInfo.image is invalid. - /// E_POINTER: out_data is NULL. + /// E_POINTER: out_data is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -198,7 +198,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// E_INVALIDARG: boxArtInfo.resourceID or boxArtInfo.xml is invalid. - /// E_POINTER: out_boxArtExtraInfo is NULL. + /// E_POINTER: out_boxArtExtraInfo is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -236,7 +236,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// E_INVALIDARG: boxArtInfo.resourceID or boxArtInfo.xml is invalid. - /// E_POINTER: out_data is NULL. + /// E_POINTER: out_data is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -263,7 +263,7 @@ namespace Sentient /// /// @param[in] culture /// This is the result of a call to SenCultureFind() or SenCultureGet*(). - /// You may also pass NULL to use the culture set with SenCultureSetCurrent(). + /// You may also pass nullptr to use the culture set with SenCultureSetCurrent(). /// /// @param[in] bufferLength /// Note that bufferLength is in wchars, and needs to _include_ space for the terminating nul. @@ -271,16 +271,16 @@ namespace Sentient /// @param[out] out_bufferLength /// Used to return the actual number of wchars written to the buffer, including the terminating nul. /// The actual length of the _string_ is (*out_bufferLength - 1). - /// Pass @a out_bufferLength = NULL if you don't care about the actual size. + /// Pass @a out_bufferLength = nullptr if you don't care about the actual size. /// /// @param[out] out_buffer /// The buffer to fill in with the string. /// It is assumed that this is preallocated to at least @a bufferLength wchars. - /// Pass @a out_buffer = NULL if you are only interested in finding out the necessary buffer size. + /// Pass @a out_buffer = nullptr if you are only interested in finding out the necessary buffer size. /// /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. - /// E_UNEXPECTED: passed a NULL culture without a default culture being set first. + /// E_UNEXPECTED: passed a nullptr culture without a default culture being set first. /// E_INVALIDARG: senXML does not contain parsed XML data. /// E_FAIL: Failed to locate text. /// S_OK: Server call spawned successfully. @@ -291,14 +291,14 @@ namespace Sentient /// First method, filling a fixed-size buffer: /// /// wchar_t buffer[1234]; - /// SenBoxArtXMLGetTitle( xml, culture, _countof(buffer), NULL, buffer ); + /// SenBoxArtXMLGetTitle( xml, culture, _countof(buffer), nullptr, buffer ); /// /// Second method, filling a dynamically-allocated buffer: /// /// size_t bufferLength; - /// SenBoxArtXMLGetTitle( xml, culture, 0, &bufferLength, NULL ); + /// SenBoxArtXMLGetTitle( xml, culture, 0, &bufferLength, nullptr ); /// wchar_t buffer = new wchar_t[bufferLength]; - /// SenBoxArtXMLGetTitle( xml, culture, bufferLength, NULL, buffer ); + /// SenBoxArtXMLGetTitle( xml, culture, bufferLength, nullptr, buffer ); /// /// @related SenBoxArtDownloadXML() /// @related SenXMLParse() @@ -319,7 +319,7 @@ namespace Sentient /// /// @param[in] culture /// This is the result of a call to SenCultureFind() or SenCultureGet*(). - /// You may also pass NULL to use the culture set with SenCultureSetCurrent(). + /// You may also pass nullptr to use the culture set with SenCultureSetCurrent(). /// /// @param[in] bufferLength /// Note that bufferLength is in wchars, and needs to _include_ space for the terminating nul. @@ -327,16 +327,16 @@ namespace Sentient /// @param[out] out_bufferLength /// Used to return the actual number of wchars written to the buffer, including the terminating nul. /// The actual length of the _string_ is (*out_bufferLength - 1). - /// Pass @a out_bufferLength = NULL if you don't care about the actual size. + /// Pass @a out_bufferLength = nullptr if you don't care about the actual size. /// /// @param[out] out_buffer /// The buffer to fill in with the string. /// It is assumed that this is preallocated to at least @a bufferLength wchars. - /// Pass @a out_buffer = NULL if you are only interested in finding out the necessary buffer size. + /// Pass @a out_buffer = nullptr if you are only interested in finding out the necessary buffer size. /// /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. - /// E_UNEXPECTED: passed a NULL culture without a default culture being set first. + /// E_UNEXPECTED: passed a nullptr culture without a default culture being set first. /// E_INVALIDARG: senXML does not contain parsed XML data. /// E_FAIL: Failed to locate text. /// S_OK: Server call spawned successfully. @@ -347,14 +347,14 @@ namespace Sentient /// First method, filling a fixed-size buffer: /// /// wchar_t buffer[1234]; - /// SenBoxArtXMLGetDescription( xml, culture, _countof(buffer), NULL, buffer ); + /// SenBoxArtXMLGetDescription( xml, culture, _countof(buffer), nullptr, buffer ); /// /// Second method, filling a dynamically-allocated buffer: /// /// size_t bufferLength; - /// SenBoxArtXMLGetDescription( xml, culture, 0, &bufferLength, NULL ); + /// SenBoxArtXMLGetDescription( xml, culture, 0, &bufferLength, nullptr ); /// wchar_t buffer = new wchar_t[bufferLength]; - /// SenBoxArtXMLGetDescription( xml, culture, bufferLength, NULL, buffer ); + /// SenBoxArtXMLGetDescription( xml, culture, bufferLength, nullptr, buffer ); /// /// @related SenBoxArtDownloadXML() /// @related SenXMLParse() @@ -390,7 +390,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// E_INVALIDARG: boxArtInfo.resourceID or boxArtInfo.image is invalid. - /// E_POINTER: out_data is NULL. + /// E_POINTER: out_data is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientConfig.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientConfig.h index 81c2f3cc..0aca08ef 100644 --- a/Minecraft.Client/Xbox/Sentient/Include/SenClientConfig.h +++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientConfig.h @@ -55,7 +55,7 @@ namespace Sentient /// /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. - /// E_POINTER: out_configInfo is NULL. + /// E_POINTER: out_configInfo is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -95,7 +95,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// E_INVALIDARG: configInfo.resourceID or configInfo.config is invalid. - /// E_POINTER: out_data is NULL. + /// E_POINTER: out_data is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientCore.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientCore.h index f86eb92a..4d3815d2 100644 --- a/Minecraft.Client/Xbox/Sentient/Include/SenClientCore.h +++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientCore.h @@ -42,7 +42,7 @@ 3. Many functions are designed for asynchronous use, and will internally create a task that will only finish after feedback from the server. - a. These functions can be either blocking or asynchronous. If the callback pointer is NULL + a. These functions can be either blocking or asynchronous. If the callback pointer is nullptr then it is a blocking call. b. If the call is asynchronous, then it will always return instantly, and will return S_OK if a task has been created. diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientCultureBackCompat_SenClientUGC.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientCultureBackCompat_SenClientUGC.h index b36fd6e5..02e255e8 100644 --- a/Minecraft.Client/Xbox/Sentient/Include/SenClientCultureBackCompat_SenClientUGC.h +++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientCultureBackCompat_SenClientUGC.h @@ -25,8 +25,8 @@ namespace Sentient /// /// @param[in] culture /// This is the result of a call to SenCultureFind() or SenCultureGet*(). - /// You may also pass NULL to use the culture set with SenCultureSetCurrent(). - /// May be NULL for default culture. + /// You may also pass nullptr to use the culture set with SenCultureSetCurrent(). + /// May be nullptr for default culture. /// /// @param[in] maxResults /// Used to indicate the number of items to be returned by @a out_feedInfo. diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientDynamicConfig.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientDynamicConfig.h index d6c5cb64..7b652aae 100644 --- a/Minecraft.Client/Xbox/Sentient/Include/SenClientDynamicConfig.h +++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientDynamicConfig.h @@ -34,7 +34,7 @@ namespace Sentient /// /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. - /// E_POINTER: size is NULL. + /// E_POINTER: size is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -66,7 +66,7 @@ namespace Sentient /// /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. - /// E_POINTER: size is NULL. + /// E_POINTER: size is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -109,7 +109,7 @@ namespace Sentient /// /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. - /// E_POINTER: out_data is NULL. + /// E_POINTER: out_data is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -149,7 +149,7 @@ namespace Sentient /// /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. - /// E_POINTER: out_data is NULL. + /// E_POINTER: out_data is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientFame.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientFame.h index 1e823075..8f07b1ce 100644 --- a/Minecraft.Client/Xbox/Sentient/Include/SenClientFame.h +++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientFame.h @@ -215,7 +215,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call. - /// E_POINTER: out_userFameVIPArray is NULL. + /// E_POINTER: out_userFameVIPArray is nullptr. /// SENTIENT_E_TOO_MANY_CALLS: This call has been rejected to avoid excessive server load. Try again later. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. @@ -243,7 +243,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call. - /// E_POINTER: out_fameVIPData is NULL. + /// E_POINTER: out_fameVIPData is nullptr. /// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_fameVIPData has not been filled in. /// S_OK: The operation completed successfully. /// @@ -304,8 +304,8 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call. - /// E_POINTER: out_entryArray or out_leaderboardResults is NULL. - /// E_INVALIDARG: userCallback is NULL and out_senHandle is non-NULL. Task handles are not supported for synchronous requests. + /// E_POINTER: out_entryArray or out_leaderboardResults is nullptr. + /// E_INVALIDARG: userCallback is nullptr and out_senHandle is non-nullptr. Task handles are not supported for synchronous requests. /// SENTIENT_E_TOO_MANY_CALLS: This call has been rejected to avoid excessive server load. Try again later. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. @@ -331,7 +331,7 @@ namespace Sentient /// /// @return SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call. - /// E_POINTER: out_awardData is NULL. + /// E_POINTER: out_awardData is nullptr. /// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_awardData has not been filled in. /// S_FALSE: The operation completed successfully but there were no awards to report. out_awardData has not been filled in. /// S_OK: The operation completed successfully and there was a valid award to report. out_awardData contains information about the award. @@ -351,7 +351,7 @@ namespace Sentient /// /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. - /// E_POINTER: out_timeRemaining is NULL. + /// E_POINTER: out_timeRemaining is nullptr. /// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_timeRemaining has not been filled in. /// E_FAIL: Internal failure. Check log for output. /// S_OK: Call completed successfully and out_timeRemaining has been filled in. @@ -373,7 +373,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call. - /// E_POINTER: out_timeRemaining is NULL. + /// E_POINTER: out_timeRemaining is nullptr. /// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_timeRemaining has not been filled in. /// S_FALSE: The VIP level of the supplied user does not expire. out_timeRemaining has not been filled in. /// E_FAIL: Internal failure. Check log for output. @@ -400,7 +400,7 @@ namespace Sentient /// /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. - /// E_POINTER: out_name is NULL. + /// E_POINTER: out_name is nullptr. /// E_INVALIDARG: vipLevel is outside the range of known VIP levels. /// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_name has not been filled in. /// S_OK: The operation completed successfully. @@ -423,7 +423,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call. - /// E_POINTER: out_count is NULL. + /// E_POINTER: out_count is nullptr. /// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_count has not been filled in. /// E_FAIL: Internal failure. Check log for output. /// S_OK: The operation completed successfully. @@ -456,7 +456,7 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call. - /// E_POINTER: out_dataCount or out_displayData is NULL. + /// E_POINTER: out_dataCount or out_displayData is nullptr. /// E_INVALIDARG: startIndex is greater than the total number of items available. /// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and output parameters have not been filled in. /// E_FAIL: Internal failure. Check log for output. @@ -553,8 +553,8 @@ namespace Sentient /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. /// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call. - /// E_INVALIDARG: Either userCallback is NULL and out_senHandle is non-NULL, or participantCount is less than 2. - /// E_POINTER: participants is NULL. + /// E_INVALIDARG: Either userCallback is nullptr and out_senHandle is non-nullptr, or participantCount is less than 2. + /// E_POINTER: participants is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientResource.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientResource.h index e8405d5e..b749a164 100644 --- a/Minecraft.Client/Xbox/Sentient/Include/SenClientResource.h +++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientResource.h @@ -45,10 +45,10 @@ namespace Sentient enum SenResourceID : INT32 { /// This is used to indicate a failed search, an invalid resource structure, or sometimes to substitute for a default. - SenResourceID_Invalid = (INT32)SenResourceType_Invalid << 24, + SenResourceID_Invalid = static_cast(SenResourceType_Invalid) << 24, /// This is the first VIP reward costume and there is one for each title. - SenResourceID_Superstar_0 = (INT32)SenResourceType_Avatar << 24, + SenResourceID_Superstar_0 = static_cast(SenResourceType_Avatar) << 24, /// This is the second VIP reward costume and there is one for each title. SenResourceID_Superstar_1, /// This is the third VIP reward costume and there is one for each title. @@ -59,15 +59,15 @@ namespace Sentient SenResourceID_Superstar_4, /// This is used for the cross-sell screen and contains things such as an image, offerID, strings, etc. - SenResourceID_BoxArt_0 = (INT32)SenResourceType_BoxArt << 24, + SenResourceID_BoxArt_0 = static_cast(SenResourceType_BoxArt) << 24, /// This is used for game-private config files, and is only the base of the range. /// Titles may use the entire 24-bit space for various custom config files. - SenResourceID_Config_0 = (INT32)SenResourceType_Config << 24, + SenResourceID_Config_0 = static_cast(SenResourceType_Config) << 24, /// This is used for server-supplied help files/text. /// At the moment, this is not supported. - SenResourceID_Help_0 = (INT32)SenResourceType_Help << 24, + SenResourceID_Help_0 = static_cast(SenResourceType_Help) << 24, }; diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientUGC.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientUGC.h index da1b1f65..b4024571 100644 --- a/Minecraft.Client/Xbox/Sentient/Include/SenClientUGC.h +++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientUGC.h @@ -97,7 +97,7 @@ namespace Sentient // metadata for a lot of UGCs at once. // Note: if a level has been uploaded with main data before, and the creator // wants to just modify the metadata, they can upload the metadata with the - // maindatablobs being NULL. + // maindatablobs being nullptr. // NOTE: for large items, use the SenUGCUploadMainData method with the SenUGCProgressInfo // signature so you can get the running progress and a cancellation token // to abort the upload (allowing UI for the user, etc) @@ -159,7 +159,7 @@ namespace Sentient // be used to abort the upload. This is useful for large uploads where // you may want to allow the user to cancel. // NOTE: This call is asynchronous ONLY and will error for synchronous - // attempts with a NULL param for userCallback. + // attempts with a nullptr param for userCallback. // There are multiple data blobs supported (the exact number is defined in // SenUGCMainData_NrBlobs) on subsequent calls. Slot zero is to be used by a // game to store a preview thumbnail, which can then be downloaded without @@ -172,7 +172,7 @@ namespace Sentient // metadata for a lot of UGCs at once. // NOTE: if a level has been uploaded with main data before, and the creator // wants to just modify the metadata, they can upload the metadata with the - // main data blob being NULL. + // main data blob being nullptr. // NOTE: If a creator uploads a data blob again, it will overwrite the previous // stored blob with the new one. //************************************ @@ -848,8 +848,8 @@ namespace Sentient /// /// @param[in] culture /// This is the result of a call to SenCultureFind() or SenCultureGet*(). - /// You may also pass NULL to use the culture set with SenCultureSetCurrent(). - /// May be NULL for default culture. + /// You may also pass nullptr to use the culture set with SenCultureSetCurrent(). + /// May be nullptr for default culture. /// /// @param[in] maxResults /// Used to indicate the number of items to be returned by @a out_feedInfo. diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientUser.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientUser.h index cf3ef0b3..4c48ee50 100644 --- a/Minecraft.Client/Xbox/Sentient/Include/SenClientUser.h +++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientUser.h @@ -61,7 +61,7 @@ namespace Sentient /// /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. - /// E_POINTER: out_isInRole is NULL. + /// E_POINTER: out_isInRole is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// @@ -91,7 +91,7 @@ namespace Sentient /// /// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include: /// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first. - /// E_POINTER: out_isInRole is NULL. + /// E_POINTER: out_isInRole is nullptr. /// E_FAIL: Failed to spawn server call. /// S_OK: Server call spawned successfully. /// -- cgit v1.2.3