mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
C++ modernization: Replace NULLs with typesafe nullptrs (#1799)
Fixing CI errors and build errors Reverted changes: NULL in EV_SET macro; Clang-formatting Reverted changes: MacosX *.m files reverted from master
This commit is contained in:
committed by
GitHub
parent
098c7508e3
commit
43d1ece562
@@ -44,7 +44,7 @@ void tr_ptrArrayForeach(tr_ptrArray* array, PtrArrayForeachFunc func);
|
||||
@return the nth item in a tr_ptrArray */
|
||||
static inline void* tr_ptrArrayNth(tr_ptrArray* array, int i)
|
||||
{
|
||||
TR_ASSERT(array != NULL);
|
||||
TR_ASSERT(array != nullptr);
|
||||
TR_ASSERT(i >= 0);
|
||||
TR_ASSERT(i < array->n_items);
|
||||
|
||||
@@ -61,7 +61,7 @@ void* tr_ptrArrayPop(tr_ptrArray* array);
|
||||
@see tr_ptrArrayPop() */
|
||||
static inline void* tr_ptrArrayBack(tr_ptrArray* array)
|
||||
{
|
||||
return array->n_items > 0 ? tr_ptrArrayNth(array, array->n_items - 1) : NULL;
|
||||
return array->n_items > 0 ? tr_ptrArrayNth(array, array->n_items - 1) : nullptr;
|
||||
}
|
||||
|
||||
void tr_ptrArrayErase(tr_ptrArray* t, int begin, int end);
|
||||
|
||||
Reference in New Issue
Block a user