From 1c0172cca4f1e90679321912e20436a7f42f122d Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Sat, 24 Feb 2018 15:32:06 +0100 Subject: more nullptr --- plugins/NewAwaySysMod/src/TMyArray.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/NewAwaySysMod/src/TMyArray.h') diff --git a/plugins/NewAwaySysMod/src/TMyArray.h b/plugins/NewAwaySysMod/src/TMyArray.h index 68ca908fe1..45eeaf1563 100644 --- a/plugins/NewAwaySysMod/src/TMyArray.h +++ b/plugins/NewAwaySysMod/src/TMyArray.h @@ -41,7 +41,7 @@ public: void MoveElem(int nIndex, int nMoveTo); T& SetAtGrow(int nIndex); int Find(ARG_T pElem); // returns an index of the specified item, or -1 if the array doesn't contain the item - int BinarySearch(int (*CmpFunc)(ARG_T pItem, LPARAM lParam), LPARAM lParam, int *pIndex = NULL); // returns an index of the specified item, or -1 if the array doesn't contain the item; + int BinarySearch(int (*CmpFunc)(ARG_T pItem, LPARAM lParam), LPARAM lParam, int *pIndex = nullptr); // returns an index of the specified item, or -1 if the array doesn't contain the item; // also it's possible to specify pIndex so that even if the array doesn't contain the item, the function will set *pIndex to a position where the item can be inserted; // CmpFunc must return -1, 0 and 1 depending whether pItem is lesser, equal or greater than needed; // BinarySearch() requires the array to be sorted in an ascending order @@ -65,7 +65,7 @@ TMyArray::TMyArray() { nElemNum = 0; nAllocNum = 0; - pData = NULL; + pData = nullptr; } template @@ -73,7 +73,7 @@ TMyArray::TMyArray(const TMyArray __forceinline int TMyArray::SetAllocNum(int nNewAllocNum) { _ASSERT(nNewAllocNum >= nElemNum); - T*pNewData = (nNewAllocNum) ? (T*)malloc(sizeof(T) * nNewAllocNum) : NULL; + T*pNewData = (nNewAllocNum) ? (T*)malloc(sizeof(T) * nNewAllocNum) : nullptr; if (pData) { if (pNewData) -- cgit v1.2.3