arm64 : fix intptr_t size

This commit is contained in:
hymei
2022-06-05 01:12:32 +03:00
committed by nillerusr
parent 2690e6c85a
commit 4e4039d756
143 changed files with 1015 additions and 674 deletions
+6 -6
View File
@@ -671,7 +671,7 @@ bool CAssetCache::AddFilesInDirectory( CachedAssetList_t& list, const char *pSta
//-----------------------------------------------------------------------------
bool CAssetCache::ContinueSearchForAssets( AssetList_t hList, float flDuration )
{
CachedAssetList_t& list = m_CachedAssets[ (int)hList ];
CachedAssetList_t& list = m_CachedAssets[ (intp)hList ];
float flStartTime = Plat_FloatTime();
while ( list.m_DirectoriesToCheck.Count() )
@@ -710,7 +710,7 @@ bool CAssetCache::ContinueSearchForAssets( AssetList_t hList, float flDuration )
//-----------------------------------------------------------------------------
bool CAssetCache::BeginAssetScan( AssetList_t hList, bool bForceRescan )
{
CachedAssetList_t& list = m_CachedAssets[ (int)hList ];
CachedAssetList_t& list = m_CachedAssets[ (intp)hList ];
if ( bForceRescan )
{
list.m_bAssetScanComplete = false;
@@ -758,27 +758,27 @@ AssetList_t CAssetCache::FindAssetList( const char *pAssetType, const char *pSub
list.m_pFileTree = new CAssetTreeView( NULL, "FolderFilter", pAssetType, pSubDir );
}
return (AssetList_t)nIndex;
return (AssetList_t)(intp)nIndex;
}
CAssetTreeView* CAssetCache::GetFileTree( AssetList_t hList )
{
if ( hList == ASSET_LIST_INVALID )
return NULL;
return m_CachedAssets[ (int)hList ].m_pFileTree;
return m_CachedAssets[ (intp)hList ].m_pFileTree;
}
int CAssetCache::GetAssetCount( AssetList_t hList ) const
{
if ( hList == ASSET_LIST_INVALID )
return 0;
return m_CachedAssets[ (int)hList ].m_AssetList.Count();
return m_CachedAssets[ (intp)hList ].m_AssetList.Count();
}
const CAssetCache::CachedAssetInfo_t& CAssetCache::GetAsset( AssetList_t hList, int nIndex ) const
{
Assert( nIndex < GetAssetCount(hList) );
return m_CachedAssets[ (int)hList ].m_AssetList[ nIndex ];
return m_CachedAssets[ (intp)hList ].m_AssetList[ nIndex ];
}
+5 -5
View File
@@ -862,7 +862,7 @@ int ListPanel::FindColumn(const char *columnName)
// data->GetName() is used to uniquely identify an item
// data sub items are matched against column header name to be used in the table
//-----------------------------------------------------------------------------
int ListPanel::AddItem( const KeyValues *item, unsigned int userData, bool bScrollToItem, bool bSortOnAdd)
int ListPanel::AddItem( const KeyValues *item, uintp userData, bool bScrollToItem, bool bSortOnAdd)
{
FastSortListPanelItem *newitem = new FastSortListPanelItem;
newitem->kv = item->MakeCopy();
@@ -898,7 +898,7 @@ int ListPanel::AddItem( const KeyValues *item, unsigned int userData, bool bScro
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void ListPanel::SetUserData( int itemID, unsigned int userData )
void ListPanel::SetUserData( int itemID, uintp userData )
{
if ( !m_DataItems.IsValidIndex(itemID) )
return;
@@ -909,7 +909,7 @@ void ListPanel::SetUserData( int itemID, unsigned int userData )
//-----------------------------------------------------------------------------
// Purpose: Finds the first itemID with a matching userData
//-----------------------------------------------------------------------------
int ListPanel::GetItemIDFromUserData( unsigned int userData )
int ListPanel::GetItemIDFromUserData( uintp userData )
{
FOR_EACH_LL( m_DataItems, itemID )
{
@@ -1064,7 +1064,7 @@ ListPanelItem *ListPanel::GetItemData( int itemID )
//-----------------------------------------------------------------------------
// Purpose: returns user data for itemID
//-----------------------------------------------------------------------------
unsigned int ListPanel::GetItemUserData(int itemID)
uintp ListPanel::GetItemUserData(int itemID)
{
if ( !m_DataItems.IsValidIndex(itemID) )
return 0;
@@ -2828,7 +2828,7 @@ void ListPanel::SortList( void )
//-----------------------------------------------------------------------------
void ListPanel::SetFont(HFont font)
{
Assert( font );
Assert( font );
if ( !font )
return;
+2 -2
View File
@@ -2547,12 +2547,12 @@ int RichText::ParseTextStringForUrls( const char *text, int startPos, char *pchU
// get the url
i += Q_strlen( "<a href=" );
const char *pchURLEnd = Q_strstr( text + i, ">" );
Q_strncpy( pchURL, text + i, min( pchURLEnd - text - i + 1, cchURL ) );
Q_strncpy( pchURL, text + i, min( (int)(pchURLEnd - text) - i + 1, cchURL ) );
i += ( pchURLEnd - text - i + 1 );
// get the url text
pchURLEnd = Q_strstr( text, "</a>" );
Q_strncpy( pchURLText, text + i, min( pchURLEnd - text - i + 1, cchURLText ) );
Q_strncpy( pchURLText, text + i, min( (int)(pchURLEnd - text) - i + 1, cchURLText ) );
i += ( pchURLEnd - text - i );
i += Q_strlen( "</a>" );