From 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a Mon Sep 17 00:00:00 2001 From: Loki Rautio Date: Sat, 7 Mar 2026 21:12:22 -0600 Subject: Revert "Project modernization (#630)" This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c41a02d207233199e98898fe7483d7e817. --- Minecraft.Client/Common/XUI/XUI_Ctrl_4JList.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Minecraft.Client/Common/XUI/XUI_Ctrl_4JList.cpp') diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_4JList.cpp b/Minecraft.Client/Common/XUI/XUI_Ctrl_4JList.cpp index 7523c523..4c615979 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_4JList.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_4JList.cpp @@ -7,7 +7,7 @@ HRESULT CXuiCtrl4JList::OnInit(XUIMessageInit *pInitData, BOOL& bHandled) { InitializeCriticalSection(&m_AccessListData); - m_hSelectionChangedHandlerObj = nullptr; + m_hSelectionChangedHandlerObj = NULL; return S_OK; } @@ -22,13 +22,13 @@ void CXuiCtrl4JList::AddData( const LIST_ITEM_INFO& ItemInfo , int iSortListFrom if(ItemInfo.pwszText) { - dwLen1=static_cast(wcslen(ItemInfo.pwszText))*sizeof(WCHAR); + dwLen1=(int)wcslen(ItemInfo.pwszText)*sizeof(WCHAR); dwBytes+=dwLen1+sizeof(WCHAR); } if(ItemInfo.pwszImage) { - dwLen2=static_cast(wcslen(ItemInfo.pwszImage))*sizeof(WCHAR); + dwLen2=(int)(wcslen(ItemInfo.pwszImage))*sizeof(WCHAR); dwBytes+=dwLen2+sizeof(WCHAR); } @@ -59,11 +59,11 @@ void CXuiCtrl4JList::AddData( const LIST_ITEM_INFO& ItemInfo , int iSortListFrom // need to remember the original index of this addition before it gets sorted - this will get used to load the game if(iSortListFromIndex!=-1) { - pItemInfo->iIndex=static_cast(m_vListData.size())-iSortListFromIndex; + pItemInfo->iIndex=(int)m_vListData.size()-iSortListFromIndex; } else { - pItemInfo->iIndex=static_cast(m_vListData.size()); + pItemInfo->iIndex=(int)m_vListData.size(); } // added to force a sort order for DLC @@ -110,7 +110,7 @@ void CXuiCtrl4JList::RemoveAllData( ) { EnterCriticalSection(&m_AccessListData); - int iSize=static_cast(m_vListData.size()); + int iSize=(int)m_vListData.size(); for(int i=0;icItems = static_cast(m_vListData.size()); + pGetItemCountData->cItems = (int)m_vListData.size(); bHandled = TRUE; return S_OK; } @@ -315,7 +315,7 @@ HRESULT CXuiCtrl4JList::OnGetSourceDataImage(XUIMessageGetSourceImage *pGetSourc { // Check for a brush EnterCriticalSection(&m_AccessListData); - if(GetData(pGetSourceImageData->iItem).hXuiBrush!=nullptr) + if(GetData(pGetSourceImageData->iItem).hXuiBrush!=NULL) { pGetSourceImageData->hBrush=GetData(pGetSourceImageData->iItem).hXuiBrush; } -- cgit v1.2.3