comparison UI/UiGame.cpp @ 2369:bddcaf5d5db2

removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
author Grumpy7
date Mon, 12 May 2014 01:50:32 +0200
parents 4100fb5c4913
children 6a7309a847ea eff78dab2142
comparison
equal deleted inserted replaced
2368:91b6c0a338ad 2369:bddcaf5d5db2
207 { 207 {
208 lpsz = (LPCSTR)pNPCStats->pProfessions[pNPC->uProfession].pJoinText; 208 lpsz = (LPCSTR)pNPCStats->pProfessions[pNPC->uProfession].pJoinText;
209 if ( !lpsz ) 209 if ( !lpsz )
210 lpsz = ""; 210 lpsz = "";
211 } 211 }
212 popup_window.Hint = 0; 212 popup_window.Hint = nullptr;
213 popup_window.uFrameX = 38; 213 popup_window.uFrameX = 38;
214 popup_window.uFrameY = 60; 214 popup_window.uFrameY = 60;
215 popup_window.uFrameWidth = 276; 215 popup_window.uFrameWidth = 276;
216 popup_window.uFrameZ = 313; 216 popup_window.uFrameZ = 313;
217 popup_window.uFrameHeight = pFontArrus->CalcTextHeight(lpsz, &popup_window, 0, 0) + 2 * LOBYTE(pFontArrus->uFontHeight) + 24; 217 popup_window.uFrameHeight = pFontArrus->CalcTextHeight(lpsz, &popup_window, 0, 0) + 2 * LOBYTE(pFontArrus->uFontHeight) + 24;
361 int v42; // edi@102 361 int v42; // edi@102
362 int v45; 362 int v45;
363 unsigned __int16 pTextColor; // ax@104 363 unsigned __int16 pTextColor; // ax@104
364 GUIWindow window; // [sp+ACh] [bp-68h]@42 364 GUIWindow window; // [sp+ACh] [bp-68h]@42
365 // GUIFont *pOutString; // [sp+10Ch] [bp-8h]@39 365 // GUIFont *pOutString; // [sp+10Ch] [bp-8h]@39
366 const char *pInString=NULL; // [sp+110h] [bp-4h]@32 366 const char *pInString=nullptr; // [sp+110h] [bp-4h]@32
367 367
368 if ( !pDialogueWindow ) 368 if ( !pDialogueWindow )
369 return; 369 return;
370 370
371 // Window title(Заголовок окна)---- 371 // Window title(Заголовок окна)----
575 pButton->pButtonName[0] = 0; 575 pButton->pButtonName[0] = 0;
576 576
577 if (pParty->field_7B5_in_arena_quest && pParty->field_7B5_in_arena_quest != -1) 577 if (pParty->field_7B5_in_arena_quest && pParty->field_7B5_in_arena_quest != -1)
578 { 578 {
579 int num_dead_actors = 0; 579 int num_dead_actors = 0;
580 pInString = 0; 580 pInString = nullptr;
581 for ( uint i = 0; i < uNumActors; ++i ) 581 for ( uint i = 0; i < uNumActors; ++i )
582 { 582 {
583 if (pActors[i].uAIState == Dead || pActors[i].uAIState == Removed || pActors[i].uAIState == Disabled) 583 if (pActors[i].uAIState == Dead || pActors[i].uAIState == Removed || pActors[i].uAIState == Disabled)
584 ++num_dead_actors; 584 ++num_dead_actors;
585 else 585 else