comparison StorylineTextTable.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 53d4e8539ca1
children f4af3b203f65
comparison
equal deleted inserted replaced
2368:91b6c0a338ad 2369:bddcaf5d5db2
12 //----- (00453E6D) -------------------------------------------------------- 12 //----- (00453E6D) --------------------------------------------------------
13 void StorylineText::Initialize() 13 void StorylineText::Initialize()
14 { 14 {
15 char* test_string; 15 char* test_string;
16 16
17 if ( pHistoryTXT_Raw ) 17 free(pHistoryTXT_Raw);
18 free(pHistoryTXT_Raw);
19 pHistoryTXT_Raw = NULL;
20 pHistoryTXT_Raw = (char *)pEvents_LOD->LoadRaw("history.txt", 0); 18 pHistoryTXT_Raw = (char *)pEvents_LOD->LoadRaw("history.txt", 0);
21 strtok(pHistoryTXT_Raw, "\r"); 19 strtok(pHistoryTXT_Raw, "\r");
22 20
23 StoreLine[0].pText=nullptr; 21 StoreLine[0].pText=nullptr;
24 StoreLine[0].pPageTitle=nullptr; 22 StoreLine[0].pPageTitle=nullptr;