More nullptrs
This commit is contained in:
parent
250203ec4c
commit
73669d78d2
|
@ -15,7 +15,7 @@ namespace fallout {
|
||||||
bool autorunMutexCreate()
|
bool autorunMutexCreate()
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
gInterplayGenericAutorunMutex = CreateMutexA(NULL, FALSE, "InterplayGenericAutorunMutex");
|
gInterplayGenericAutorunMutex = CreateMutexA(nullptr, FALSE, "InterplayGenericAutorunMutex");
|
||||||
if (GetLastError() == ERROR_ALREADY_EXISTS) {
|
if (GetLastError() == ERROR_ALREADY_EXISTS) {
|
||||||
CloseHandle(gInterplayGenericAutorunMutex);
|
CloseHandle(gInterplayGenericAutorunMutex);
|
||||||
return false;
|
return false;
|
||||||
|
@ -29,7 +29,7 @@ bool autorunMutexCreate()
|
||||||
void autorunMutexClose()
|
void autorunMutexClose()
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (gInterplayGenericAutorunMutex != NULL) {
|
if (gInterplayGenericAutorunMutex != nullptr) {
|
||||||
CloseHandle(gInterplayGenericAutorunMutex);
|
CloseHandle(gInterplayGenericAutorunMutex);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4130,7 +4130,7 @@ static int characterEditorShowOptions()
|
||||||
getmsg(&gCharacterEditorMessageList, &gCharacterEditorMessageListItem, 609));
|
getmsg(&gCharacterEditorMessageList, &gCharacterEditorMessageListItem, 609));
|
||||||
strcpy(string5, getmsg(&gCharacterEditorMessageList, &gCharacterEditorMessageListItem, 610));
|
strcpy(string5, getmsg(&gCharacterEditorMessageList, &gCharacterEditorMessageListItem, 610));
|
||||||
|
|
||||||
if (showDialogBox(string4, dialogBody, 1, 169, 126, _colorTable[32328], NULL, _colorTable[32328], DIALOG_BOX_YES_NO) != 0) {
|
if (showDialogBox(string4, dialogBody, 1, 169, 126, _colorTable[32328], nullptr, _colorTable[32328], DIALOG_BOX_YES_NO) != 0) {
|
||||||
shouldSave = true;
|
shouldSave = true;
|
||||||
} else {
|
} else {
|
||||||
shouldSave = false;
|
shouldSave = false;
|
||||||
|
|
|
@ -2365,7 +2365,7 @@ Object* _combat_whose_turn()
|
||||||
if (isInCombat()) {
|
if (isInCombat()) {
|
||||||
return _combat_turn_obj;
|
return _combat_turn_obj;
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1294,9 +1294,9 @@ static int _compare_nearer(const void* a1, const void* a2)
|
||||||
|
|
||||||
if (object1 == nullptr && object2 == nullptr) {
|
if (object1 == nullptr && object2 == nullptr) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (object1 != NULL && object2 == NULL) {
|
} else if (object1 != nullptr && object2 == nullptr) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if (object1 == NULL && object2 != NULL) {
|
} else if (object1 == nullptr && object2 != nullptr) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1331,9 +1331,9 @@ static int _compare_strength(const void* a1, const void* a2)
|
||||||
|
|
||||||
if (object1 == nullptr && object2 == nullptr) {
|
if (object1 == nullptr && object2 == nullptr) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (object1 != NULL && object2 == NULL) {
|
} else if (object1 != nullptr && object2 == nullptr) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if (object1 == NULL && object2 != NULL) {
|
} else if (object1 == nullptr && object2 != nullptr) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1367,9 +1367,9 @@ static int _compare_weakness(const void* a1, const void* a2)
|
||||||
|
|
||||||
if (object1 == nullptr && object2 == nullptr) {
|
if (object1 == nullptr && object2 == nullptr) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (object1 != NULL && object2 == NULL) {
|
} else if (object1 != nullptr && object2 == nullptr) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if (object1 == NULL && object2 != NULL) {
|
} else if (object1 == nullptr && object2 != nullptr) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -770,7 +770,7 @@ char* killTypeGetName(int killType)
|
||||||
MessageListItem messageListItem;
|
MessageListItem messageListItem;
|
||||||
return getmsg(&gProtoMessageList, &messageListItem, 1450 + killType);
|
return getmsg(&gProtoMessageList, &messageListItem, 1450 + killType);
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return byte_501494;
|
return byte_501494;
|
||||||
|
@ -785,7 +785,7 @@ char* killTypeGetDescription(int killType)
|
||||||
MessageListItem messageListItem;
|
MessageListItem messageListItem;
|
||||||
return getmsg(&gProtoMessageList, &messageListItem, 1469 + killType);
|
return getmsg(&gProtoMessageList, &messageListItem, 1469 + killType);
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return byte_501494;
|
return byte_501494;
|
||||||
|
|
|
@ -5188,7 +5188,7 @@ void inventoryOpenTrade(int win, Object* barterer, Object* playerTable, Object*
|
||||||
if (keyCode >= 1000 && keyCode <= 1000 + gInventorySlotsCount) {
|
if (keyCode >= 1000 && keyCode <= 1000 + gInventorySlotsCount) {
|
||||||
if (gInventoryCursor == INVENTORY_WINDOW_CURSOR_ARROW) {
|
if (gInventoryCursor == INVENTORY_WINDOW_CURSOR_ARROW) {
|
||||||
inventoryWindowOpenContextMenu(keyCode, INVENTORY_WINDOW_TYPE_TRADE);
|
inventoryWindowOpenContextMenu(keyCode, INVENTORY_WINDOW_TYPE_TRADE);
|
||||||
inventoryWindowRenderInnerInventories(win, playerTable, NULL, -1);
|
inventoryWindowRenderInnerInventories(win, playerTable, nullptr, -1);
|
||||||
} else {
|
} else {
|
||||||
int slotIndex = keyCode - 1000;
|
int slotIndex = keyCode - 1000;
|
||||||
if (slotIndex + _stack_offset[_curr_stack] < _pud->length) {
|
if (slotIndex + _stack_offset[_curr_stack] < _pud->length) {
|
||||||
|
@ -5197,7 +5197,7 @@ void inventoryOpenTrade(int win, Object* barterer, Object* playerTable, Object*
|
||||||
_barter_move_inventory(inventoryItem->item, inventoryItem->quantity, slotIndex, stackOffset, barterer, playerTable, true);
|
_barter_move_inventory(inventoryItem->item, inventoryItem->quantity, slotIndex, stackOffset, barterer, playerTable, true);
|
||||||
_display_target_inventory(_target_stack_offset[_target_curr_stack], -1, _target_pud, INVENTORY_WINDOW_TYPE_TRADE);
|
_display_target_inventory(_target_stack_offset[_target_curr_stack], -1, _target_pud, INVENTORY_WINDOW_TYPE_TRADE);
|
||||||
_display_inventory(_stack_offset[_curr_stack], -1, INVENTORY_WINDOW_TYPE_TRADE);
|
_display_inventory(_stack_offset[_curr_stack], -1, INVENTORY_WINDOW_TYPE_TRADE);
|
||||||
inventoryWindowRenderInnerInventories(win, playerTable, NULL, -1);
|
inventoryWindowRenderInnerInventories(win, playerTable, nullptr, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5205,7 +5205,7 @@ void inventoryOpenTrade(int win, Object* barterer, Object* playerTable, Object*
|
||||||
} else if (keyCode >= 2000 && keyCode <= 2000 + gInventorySlotsCount) {
|
} else if (keyCode >= 2000 && keyCode <= 2000 + gInventorySlotsCount) {
|
||||||
if (gInventoryCursor == INVENTORY_WINDOW_CURSOR_ARROW) {
|
if (gInventoryCursor == INVENTORY_WINDOW_CURSOR_ARROW) {
|
||||||
inventoryWindowOpenContextMenu(keyCode, INVENTORY_WINDOW_TYPE_TRADE);
|
inventoryWindowOpenContextMenu(keyCode, INVENTORY_WINDOW_TYPE_TRADE);
|
||||||
inventoryWindowRenderInnerInventories(win, NULL, bartererTable, -1);
|
inventoryWindowRenderInnerInventories(win, nullptr, bartererTable, -1);
|
||||||
} else {
|
} else {
|
||||||
int slotIndex = keyCode - 2000;
|
int slotIndex = keyCode - 2000;
|
||||||
if (slotIndex + _target_stack_offset[_target_curr_stack] < _target_pud->length) {
|
if (slotIndex + _target_stack_offset[_target_curr_stack] < _target_pud->length) {
|
||||||
|
@ -5214,7 +5214,7 @@ void inventoryOpenTrade(int win, Object* barterer, Object* playerTable, Object*
|
||||||
_barter_move_inventory(inventoryItem->item, inventoryItem->quantity, slotIndex, stackOffset, barterer, bartererTable, false);
|
_barter_move_inventory(inventoryItem->item, inventoryItem->quantity, slotIndex, stackOffset, barterer, bartererTable, false);
|
||||||
_display_target_inventory(_target_stack_offset[_target_curr_stack], -1, _target_pud, INVENTORY_WINDOW_TYPE_TRADE);
|
_display_target_inventory(_target_stack_offset[_target_curr_stack], -1, _target_pud, INVENTORY_WINDOW_TYPE_TRADE);
|
||||||
_display_inventory(_stack_offset[_curr_stack], -1, INVENTORY_WINDOW_TYPE_TRADE);
|
_display_inventory(_stack_offset[_curr_stack], -1, INVENTORY_WINDOW_TYPE_TRADE);
|
||||||
inventoryWindowRenderInnerInventories(win, NULL, bartererTable, -1);
|
inventoryWindowRenderInnerInventories(win, nullptr, bartererTable, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5222,7 +5222,7 @@ void inventoryOpenTrade(int win, Object* barterer, Object* playerTable, Object*
|
||||||
} else if (keyCode >= 2300 && keyCode <= 2300 + gInventorySlotsCount) {
|
} else if (keyCode >= 2300 && keyCode <= 2300 + gInventorySlotsCount) {
|
||||||
if (gInventoryCursor == INVENTORY_WINDOW_CURSOR_ARROW) {
|
if (gInventoryCursor == INVENTORY_WINDOW_CURSOR_ARROW) {
|
||||||
inventoryWindowOpenContextMenu(keyCode, INVENTORY_WINDOW_TYPE_TRADE);
|
inventoryWindowOpenContextMenu(keyCode, INVENTORY_WINDOW_TYPE_TRADE);
|
||||||
inventoryWindowRenderInnerInventories(win, playerTable, NULL, -1);
|
inventoryWindowRenderInnerInventories(win, playerTable, nullptr, -1);
|
||||||
} else {
|
} else {
|
||||||
int itemIndex = keyCode - 2300;
|
int itemIndex = keyCode - 2300;
|
||||||
if (itemIndex < _ptable_pud->length) {
|
if (itemIndex < _ptable_pud->length) {
|
||||||
|
@ -5230,7 +5230,7 @@ void inventoryOpenTrade(int win, Object* barterer, Object* playerTable, Object*
|
||||||
_barter_move_from_table_inventory(inventoryItem->item, inventoryItem->quantity, itemIndex, barterer, playerTable, true);
|
_barter_move_from_table_inventory(inventoryItem->item, inventoryItem->quantity, itemIndex, barterer, playerTable, true);
|
||||||
_display_target_inventory(_target_stack_offset[_target_curr_stack], -1, _target_pud, INVENTORY_WINDOW_TYPE_TRADE);
|
_display_target_inventory(_target_stack_offset[_target_curr_stack], -1, _target_pud, INVENTORY_WINDOW_TYPE_TRADE);
|
||||||
_display_inventory(_stack_offset[_curr_stack], -1, INVENTORY_WINDOW_TYPE_TRADE);
|
_display_inventory(_stack_offset[_curr_stack], -1, INVENTORY_WINDOW_TYPE_TRADE);
|
||||||
inventoryWindowRenderInnerInventories(win, playerTable, NULL, -1);
|
inventoryWindowRenderInnerInventories(win, playerTable, nullptr, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5238,7 +5238,7 @@ void inventoryOpenTrade(int win, Object* barterer, Object* playerTable, Object*
|
||||||
} else if (keyCode >= 2400 && keyCode <= 2400 + gInventorySlotsCount) {
|
} else if (keyCode >= 2400 && keyCode <= 2400 + gInventorySlotsCount) {
|
||||||
if (gInventoryCursor == INVENTORY_WINDOW_CURSOR_ARROW) {
|
if (gInventoryCursor == INVENTORY_WINDOW_CURSOR_ARROW) {
|
||||||
inventoryWindowOpenContextMenu(keyCode, INVENTORY_WINDOW_TYPE_TRADE);
|
inventoryWindowOpenContextMenu(keyCode, INVENTORY_WINDOW_TYPE_TRADE);
|
||||||
inventoryWindowRenderInnerInventories(win, NULL, bartererTable, -1);
|
inventoryWindowRenderInnerInventories(win, nullptr, bartererTable, -1);
|
||||||
} else {
|
} else {
|
||||||
int v45 = keyCode - 2400;
|
int v45 = keyCode - 2400;
|
||||||
if (v45 < _btable_pud->length) {
|
if (v45 < _btable_pud->length) {
|
||||||
|
@ -5246,7 +5246,7 @@ void inventoryOpenTrade(int win, Object* barterer, Object* playerTable, Object*
|
||||||
_barter_move_from_table_inventory(inventoryItem->item, inventoryItem->quantity, v45, barterer, bartererTable, false);
|
_barter_move_from_table_inventory(inventoryItem->item, inventoryItem->quantity, v45, barterer, bartererTable, false);
|
||||||
_display_target_inventory(_target_stack_offset[_target_curr_stack], -1, _target_pud, INVENTORY_WINDOW_TYPE_TRADE);
|
_display_target_inventory(_target_stack_offset[_target_curr_stack], -1, _target_pud, INVENTORY_WINDOW_TYPE_TRADE);
|
||||||
_display_inventory(_stack_offset[_curr_stack], -1, INVENTORY_WINDOW_TYPE_TRADE);
|
_display_inventory(_stack_offset[_curr_stack], -1, INVENTORY_WINDOW_TYPE_TRADE);
|
||||||
inventoryWindowRenderInnerInventories(win, NULL, bartererTable, -1);
|
inventoryWindowRenderInnerInventories(win, nullptr, bartererTable, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
// Modelled after SDL_AndroidGetExternalStoragePath.
|
// Modelled after SDL_AndroidGetExternalStoragePath.
|
||||||
const char* iOSGetDocumentsPath()
|
const char* iOSGetDocumentsPath()
|
||||||
{
|
{
|
||||||
static char* s_iOSDocumentsPath = NULL;
|
static char* s_iOSDocumentsPath = nullptr;
|
||||||
|
|
||||||
if (s_iOSDocumentsPath == NULL) {
|
if (s_iOSDocumentsPath == nullptr) {
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
NSArray* array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
NSArray* array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ const char* iOSGetDocumentsPath()
|
||||||
if (base) {
|
if (base) {
|
||||||
const size_t len = SDL_strlen(base) + 2;
|
const size_t len = SDL_strlen(base) + 2;
|
||||||
s_iOSDocumentsPath = (char*)SDL_malloc(len);
|
s_iOSDocumentsPath = (char*)SDL_malloc(len);
|
||||||
if (s_iOSDocumentsPath == NULL) {
|
if (s_iOSDocumentsPath == nullptr) {
|
||||||
SDL_OutOfMemory();
|
SDL_OutOfMemory();
|
||||||
} else {
|
} else {
|
||||||
SDL_snprintf(s_iOSDocumentsPath, len, "%s/", base);
|
SDL_snprintf(s_iOSDocumentsPath, len, "%s/", base);
|
||||||
|
|
|
@ -1672,7 +1672,7 @@ static int _check_door_state(Object* a1, Object* a2)
|
||||||
|
|
||||||
CacheEntry* artHandle;
|
CacheEntry* artHandle;
|
||||||
Art* art = artLock(a1->fid, &artHandle);
|
Art* art = artLock(a1->fid, &artHandle);
|
||||||
if (art == NULL) {
|
if (art == nullptr) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,8 @@ char* pcStatGetName(int pcStat);
|
||||||
char* pcStatGetDescription(int pcStat);
|
char* pcStatGetDescription(int pcStat);
|
||||||
int statGetFrmId(int stat);
|
int statGetFrmId(int stat);
|
||||||
int statRoll(Object* critter, int stat, int modifier, int* howMuch);
|
int statRoll(Object* critter, int stat, int modifier, int* howMuch);
|
||||||
int pcAddExperience(int xp, int* xpGained = NULL);
|
int pcAddExperience(int xp, int* xpGained = nullptr);
|
||||||
int pcAddExperienceWithOptions(int xp, bool a2, int* xpGained = NULL);
|
int pcAddExperienceWithOptions(int xp, bool a2, int* xpGained = nullptr);
|
||||||
int pcSetExperience(int a1);
|
int pcSetExperience(int a1);
|
||||||
|
|
||||||
static inline bool statIsValid(int stat)
|
static inline bool statIsValid(int stat)
|
||||||
|
|
|
@ -380,7 +380,7 @@ static bool createRenderer(int width, int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
gSdlTextureSurface = SDL_CreateRGBSurfaceWithFormat(0, width, height, SDL_BITSPERPIXEL(format), format);
|
gSdlTextureSurface = SDL_CreateRGBSurfaceWithFormat(0, width, height, SDL_BITSPERPIXEL(format), format);
|
||||||
if (gSdlTextureSurface == NULL) {
|
if (gSdlTextureSurface == nullptr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace fallout {
|
||||||
bool gProgramIsActive = false;
|
bool gProgramIsActive = false;
|
||||||
|
|
||||||
// GNW95MUTEX
|
// GNW95MUTEX
|
||||||
HANDLE _GNW95_mutex = NULL;
|
HANDLE _GNW95_mutex = nullptr;
|
||||||
|
|
||||||
// 0x4DE700
|
// 0x4DE700
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
|
|
|
@ -1329,7 +1329,7 @@ void programWindowSetTitle(const char* title)
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (_GNW95_title_mutex == INVALID_HANDLE_VALUE) {
|
if (_GNW95_title_mutex == INVALID_HANDLE_VALUE) {
|
||||||
_GNW95_title_mutex = CreateMutexA(NULL, TRUE, title);
|
_GNW95_title_mutex = CreateMutexA(nullptr, TRUE, title);
|
||||||
if (GetLastError() != ERROR_SUCCESS) {
|
if (GetLastError() != ERROR_SUCCESS) {
|
||||||
_GNW95_already_running = true;
|
_GNW95_already_running = true;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2204,7 +2204,7 @@ static int wmParseSubConditional(char** stringPtr, const char* a2, int* typePtr,
|
||||||
*paramPtr = atoi(string);
|
*paramPtr = atoi(string);
|
||||||
|
|
||||||
pch = strstr(string, ")");
|
pch = strstr(string, ")");
|
||||||
if (pch != NULL) {
|
if (pch != nullptr) {
|
||||||
string = pch + 1;
|
string = pch + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2216,12 +2216,12 @@ static int wmParseSubConditional(char** stringPtr, const char* a2, int* typePtr,
|
||||||
*valuePtr = atoi(string);
|
*valuePtr = atoi(string);
|
||||||
|
|
||||||
pch = strstr(string, ")");
|
pch = strstr(string, ")");
|
||||||
if (pch != NULL) {
|
if (pch != nullptr) {
|
||||||
string = pch + 1;
|
string = pch + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pch = strstr(string, ",");
|
pch = strstr(string, ",");
|
||||||
if (pch != NULL) {
|
if (pch != nullptr) {
|
||||||
string = pch + 1;
|
string = pch + 1;
|
||||||
}
|
}
|
||||||
*stringPtr = string;
|
*stringPtr = string;
|
||||||
|
@ -2239,12 +2239,12 @@ static int wmParseSubConditional(char** stringPtr, const char* a2, int* typePtr,
|
||||||
*valuePtr = atoi(string);
|
*valuePtr = atoi(string);
|
||||||
|
|
||||||
pch = strstr(string, ")");
|
pch = strstr(string, ")");
|
||||||
if (pch != NULL) {
|
if (pch != nullptr) {
|
||||||
string = pch + 1;
|
string = pch + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pch = strstr(string, ",");
|
pch = strstr(string, ",");
|
||||||
if (pch != NULL) {
|
if (pch != nullptr) {
|
||||||
string = pch + 1;
|
string = pch + 1;
|
||||||
}
|
}
|
||||||
*stringPtr = string;
|
*stringPtr = string;
|
||||||
|
@ -2262,12 +2262,12 @@ static int wmParseSubConditional(char** stringPtr, const char* a2, int* typePtr,
|
||||||
*valuePtr = atoi(string);
|
*valuePtr = atoi(string);
|
||||||
|
|
||||||
pch = strstr(string, ")");
|
pch = strstr(string, ")");
|
||||||
if (pch != NULL) {
|
if (pch != nullptr) {
|
||||||
string = pch + 1;
|
string = pch + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pch = strstr(string, ",");
|
pch = strstr(string, ",");
|
||||||
if (pch != NULL) {
|
if (pch != nullptr) {
|
||||||
string = pch + 1;
|
string = pch + 1;
|
||||||
}
|
}
|
||||||
*stringPtr = string;
|
*stringPtr = string;
|
||||||
|
@ -2285,12 +2285,12 @@ static int wmParseSubConditional(char** stringPtr, const char* a2, int* typePtr,
|
||||||
*valuePtr = atoi(string);
|
*valuePtr = atoi(string);
|
||||||
|
|
||||||
pch = strstr(string, ")");
|
pch = strstr(string, ")");
|
||||||
if (pch != NULL) {
|
if (pch != nullptr) {
|
||||||
string = pch + 1;
|
string = pch + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pch = strstr(string, ",");
|
pch = strstr(string, ",");
|
||||||
if (pch != NULL) {
|
if (pch != nullptr) {
|
||||||
string = pch + 1;
|
string = pch + 1;
|
||||||
}
|
}
|
||||||
*stringPtr = string;
|
*stringPtr = string;
|
||||||
|
@ -2308,12 +2308,12 @@ static int wmParseSubConditional(char** stringPtr, const char* a2, int* typePtr,
|
||||||
*valuePtr = atoi(string);
|
*valuePtr = atoi(string);
|
||||||
|
|
||||||
pch = strstr(string, ")");
|
pch = strstr(string, ")");
|
||||||
if (pch != NULL) {
|
if (pch != nullptr) {
|
||||||
string = pch + 1;
|
string = pch + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pch = strstr(string, ",");
|
pch = strstr(string, ",");
|
||||||
if (pch != NULL) {
|
if (pch != nullptr) {
|
||||||
string = pch + 1;
|
string = pch + 1;
|
||||||
}
|
}
|
||||||
*stringPtr = string;
|
*stringPtr = string;
|
||||||
|
|
Loading…
Reference in New Issue