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.
This commit is contained in:
void_17
2026-03-02 15:58:20 +07:00
parent d63f79325f
commit 7074f35e4b
1373 changed files with 12054 additions and 12054 deletions

View File

@@ -24,7 +24,7 @@
#include "XUI_Ctrl_SlotItem.h"
#include "XUI_Ctrl_SlotItemListItem.h"
#include "XUI_Scene_AbstractContainer.h"
#ifdef _DEBUG_MENUS_ENABLED
#ifdef _DEBUG_MENUS_ENABLED
#include "XUI_DebugItemEditor.h"
#endif
@@ -44,14 +44,14 @@ void CXuiSceneAbstractContainer::PlatformInitialize(int iPad, int startIndex)
// We may have varying depths of controls here, so base off the pointers parent
HXUIOBJ parent;
XuiElementGetBounds( m_pointerControl->m_hObj, &fPointerWidth, &fPointerHeight );
XuiElementGetBounds( m_pointerControl->m_hObj, &fPointerWidth, &fPointerHeight );
XuiElementGetParent( m_pointerControl->m_hObj, &parent );
m_pointerControl->SetShow(TRUE);
XuiElementGetBounds( parent, &fPanelWidth, &fPanelHeight );
XuiElementGetBounds( parent, &fPanelWidth, &fPanelHeight );
// Get size of pointer
m_fPointerImageOffsetX = floor(fPointerWidth/2.0f);
m_fPointerImageOffsetY = floor(fPointerHeight/2.0f);
m_fPanelMinX = 0.0f;
m_fPanelMaxX = fPanelWidth;
m_fPanelMinY = 0.0f;
@@ -97,13 +97,13 @@ void CXuiSceneAbstractContainer::PlatformInitialize(int iPad, int startIndex)
m_pointerPos.x = newPointerPos.x;
m_pointerPos.y = newPointerPos.y;
#ifdef USE_POINTER_ACCEL
#ifdef USE_POINTER_ACCEL
m_fPointerVelX = 0.0f;
m_fPointerVelY = 0.0f;
m_fPointerAccelX = 0.0f;
m_fPointerAccelY = 0.0f;
#endif
// Add timer to poll controller stick input at 60Hz
HRESULT timerResult = SetTimer( POINTER_INPUT_TIMER_ID, ( 1000 / 60 ) );
assert( timerResult == S_OK );
@@ -114,7 +114,7 @@ void CXuiSceneAbstractContainer::PlatformInitialize(int iPad, int startIndex)
for ( int iSection = m_eFirstSection; iSection < m_eMaxSection; ++iSection )
{
ESceneSection eSection = ( ESceneSection )( iSection );
if(!IsSectionSlotList(eSection)) continue;
// Get dimensions of this section.
@@ -153,7 +153,7 @@ int CXuiSceneAbstractContainer::getSectionRows(ESceneSection eSection)
return GetSectionSlotList( eSection )->GetRows();
}
// Adding this so we can turn off the pointer text background, since it flickers on then off at the start of a scene where a tutorial popup is
// Adding this so we can turn off the pointer text background, since it flickers on then off at the start of a scene where a tutorial popup is
HRESULT CXuiSceneAbstractContainer::OnTransitionStart( XUIMessageTransition *pTransition, BOOL& bHandled )
{
if(pTransition->dwTransAction==XUI_TRANSITION_ACTION_DESTROY ) return S_OK;
@@ -306,7 +306,7 @@ void CXuiSceneAbstractContainer::GetItemScreenData( ESceneSection eSection, int
}
}
shared_ptr<ItemInstance> CXuiSceneAbstractContainer::getSlotItem(ESceneSection eSection, int iSlot)
std::shared_ptr<ItemInstance> CXuiSceneAbstractContainer::getSlotItem(ESceneSection eSection, int iSlot)
{
CXuiCtrlSlotItemListItem* pCXuiCtrlSlotItem;
GetSectionSlotList( eSection )->GetCXuiCtrlSlotItem( iSlot, &( pCXuiCtrlSlotItem ) );
@@ -327,7 +327,7 @@ HRESULT CXuiSceneAbstractContainer::OnTimer( XUIMessageTimer *pTimer, BOOL& bHan
// Update pointer from stick input on timer.
if ( pTimer->nId == POINTER_INPUT_TIMER_ID )
{
onMouseTick();
D3DXVECTOR3 pointerPos;
pointerPos.x = m_pointerPos.x;
@@ -348,7 +348,7 @@ HRESULT CXuiSceneAbstractContainer::OnTimer( XUIMessageTimer *pTimer, BOOL& bHan
hr = handleCustomTimer( pTimer, bHandled );
}
return hr;
}
}
HRESULT CXuiSceneAbstractContainer::OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL& bHandled)
{
@@ -443,7 +443,7 @@ void CXuiSceneAbstractContainer::adjustPointerForSafeZone()
D3DXVECTOR2 baseSceneOrigin;
float baseWidth, baseHeight;
if(CXuiSceneBase::GetBaseSceneSafeZone( m_iPad, baseSceneOrigin, baseWidth, baseHeight))
{
{
D3DXMATRIX pointerBackgroundMatrix;
XuiElementGetFullXForm( m_hPointerTextBkg, &pointerBackgroundMatrix);