diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2018-02-24 15:32:06 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2018-02-24 18:20:46 +0100 |
commit | 1c0172cca4f1e90679321912e20436a7f42f122d (patch) | |
tree | 77a544d2c09332ec176f42ebcf58a40d9c5d2b93 /plugins/NewAwaySysMod/src/TMyArray.h | |
parent | dff565f40105b20b0e8e4dba1f48ccc9b8e7ff44 (diff) |
more nullptr
Diffstat (limited to 'plugins/NewAwaySysMod/src/TMyArray.h')
-rw-r--r-- | plugins/NewAwaySysMod/src/TMyArray.h | 8 |
1 files changed, 4 insertions, 4 deletions
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<T, ARG_T, GrowBy, FreeThreshold>::TMyArray() {
nElemNum = 0;
nAllocNum = 0;
- pData = NULL;
+ pData = nullptr;
}
template <class T, class ARG_T, int GrowBy, int FreeThreshold>
@@ -73,7 +73,7 @@ TMyArray<T, ARG_T, GrowBy, FreeThreshold>::TMyArray(const TMyArray<T, ARG_T, Gro {
nElemNum = 0;
nAllocNum = 0;
- pData = NULL;
+ pData = nullptr;
*this = A;
}
@@ -99,7 +99,7 @@ template <class T, class ARG_T, int GrowBy, int FreeThreshold> __forceinline int TMyArray<T, ARG_T, GrowBy, FreeThreshold>::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)
|