mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-17 09:14:34 +00:00
refactor(Core): apply clang-tidy modernize-use-nullptr (#3819)
This commit is contained in:
@@ -27,7 +27,7 @@ protected:
|
||||
// Tell our refFrom (source) object, that the link is cut (Target destroyed)
|
||||
virtual void sourceObjectDestroyLink() = 0;
|
||||
public:
|
||||
Reference() { iRefTo = NULL; iRefFrom = NULL; }
|
||||
Reference() { iRefTo = nullptr; iRefFrom = nullptr; }
|
||||
virtual ~Reference() { }
|
||||
|
||||
// Create new link
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
ASSERT(fromObj); // fromObj MUST not be NULL
|
||||
if (isValid())
|
||||
unlink();
|
||||
if (toObj != NULL)
|
||||
if (toObj != nullptr)
|
||||
{
|
||||
iRefTo = toObj;
|
||||
iRefFrom = fromObj;
|
||||
@@ -50,8 +50,8 @@ public:
|
||||
{
|
||||
targetObjectDestroyLink();
|
||||
delink();
|
||||
iRefTo = NULL;
|
||||
iRefFrom = NULL;
|
||||
iRefTo = nullptr;
|
||||
iRefFrom = nullptr;
|
||||
}
|
||||
|
||||
// Link is invalid due to destruction of referenced target object. Call comes from the refTo object
|
||||
@@ -60,12 +60,12 @@ public:
|
||||
{
|
||||
sourceObjectDestroyLink();
|
||||
delink();
|
||||
iRefTo = NULL;
|
||||
iRefTo = nullptr;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool isValid() const // Only check the iRefTo
|
||||
{
|
||||
return iRefTo != NULL;
|
||||
return iRefTo != nullptr;
|
||||
}
|
||||
|
||||
Reference<TO, FROM>* next() { return ((Reference<TO, FROM>*) LinkedListElement::next()); }
|
||||
|
||||
Reference in New Issue
Block a user