mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-20 20:13:52 +00:00
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
This commit is contained in:
parent
88798b501d
commit
28614b922f
1373 changed files with 20086 additions and 19527 deletions
|
|
@ -26,7 +26,7 @@
|
|||
HRESULT CScene_Reinstall::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
|
||||
{
|
||||
// We'll only be in this menu from the main menu, not in game
|
||||
m_iPad = *(int *)pInitData->pvInitData;
|
||||
m_iPad = *static_cast<int *>(pInitData->pvInitData);
|
||||
|
||||
m_bIgnoreInput=false;
|
||||
MapChildControls();
|
||||
|
|
@ -224,7 +224,7 @@ HRESULT CScene_Reinstall::OnControlNavigate(XUIMessageControlNavigate *pControlN
|
|||
{
|
||||
pControlNavigateData->hObjDest=XuiControlGetNavigation(pControlNavigateData->hObjSource,pControlNavigateData->nControlNavigate,TRUE,TRUE);
|
||||
|
||||
if(pControlNavigateData->hObjDest!=NULL)
|
||||
if(pControlNavigateData->hObjDest!=nullptr)
|
||||
{
|
||||
bHandled=TRUE;
|
||||
}
|
||||
|
|
@ -241,7 +241,7 @@ HRESULT CScene_Reinstall::OnTransitionStart( XUIMessageTransition *pTransition,
|
|||
|
||||
// 4J-PB - Going to resize buttons if the text is too big to fit on any of them (Br-pt problem with the length of Unlock Full Game)
|
||||
XUIRect xuiRect;
|
||||
HXUIOBJ visual=NULL;
|
||||
HXUIOBJ visual=nullptr;
|
||||
HXUIOBJ text;
|
||||
float fMaxTextLen=0.0f;
|
||||
float fTextVisualLen;
|
||||
|
|
@ -283,7 +283,7 @@ HRESULT CScene_Reinstall::OnTransitionStart( XUIMessageTransition *pTransition,
|
|||
|
||||
int CScene_Reinstall::DeviceSelectReturned(void *pParam,bool bContinue)
|
||||
{
|
||||
CScene_Reinstall* pClass = (CScene_Reinstall*)pParam;
|
||||
CScene_Reinstall* pClass = static_cast<CScene_Reinstall *>(pParam);
|
||||
|
||||
if(!StorageManager.GetSaveDeviceSelected(pClass->m_iPad))
|
||||
{
|
||||
|
|
@ -300,7 +300,7 @@ int CScene_Reinstall::DeviceSelectReturned(void *pParam,bool bContinue)
|
|||
|
||||
int CScene_Reinstall::DeviceSelectReturned_AndReinstall(void *pParam,bool bContinue)
|
||||
{
|
||||
CScene_Reinstall* pClass = (CScene_Reinstall*)pParam;
|
||||
CScene_Reinstall* pClass = static_cast<CScene_Reinstall *>(pParam);
|
||||
|
||||
if(!StorageManager.GetSaveDeviceSelected(pClass->m_iPad))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue