mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 09:03:47 +00:00
refactor(Core): apply clang-tidy modernize-use-nullptr (#3819)
This commit is contained in:
@@ -172,7 +172,7 @@ public:
|
||||
|
||||
if (data.raw)
|
||||
return *reinterpret_cast<int64*>(data.value);
|
||||
return static_cast<int64>(strtol((char*)data.value, NULL, 10));
|
||||
return static_cast<int64>(strtol((char*)data.value, nullptr, 10));
|
||||
}
|
||||
|
||||
[[nodiscard]] float GetFloat() const
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
[[nodiscard]] char const* GetCString() const
|
||||
{
|
||||
if (!data.value)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
#ifdef ACORE_DEBUG
|
||||
if (IsNumeric())
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
|
||||
[[nodiscard]] bool IsNull() const
|
||||
{
|
||||
return data.value == NULL;
|
||||
return data.value == nullptr;
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -275,7 +275,7 @@ protected:
|
||||
void CleanUp()
|
||||
{
|
||||
delete[] ((char*)data.value);
|
||||
data.value = NULL;
|
||||
data.value = nullptr;
|
||||
}
|
||||
|
||||
static size_t SizeForType(MYSQL_FIELD* field)
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
void CommitTransaction();
|
||||
bool ExecuteTransaction(SQLTransaction& transaction);
|
||||
|
||||
operator bool () const { return m_Mysql != NULL; }
|
||||
operator bool () const { return m_Mysql != nullptr; }
|
||||
void Ping() { mysql_ping(m_Mysql); }
|
||||
|
||||
uint32 GetLastError() { return mysql_errno(m_Mysql); }
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
|
||||
static void Library_Init()
|
||||
{
|
||||
mysql_library_init(-1, NULL, NULL);
|
||||
mysql_library_init(-1, nullptr, nullptr);
|
||||
}
|
||||
|
||||
static void Library_End()
|
||||
|
||||
@@ -48,7 +48,7 @@ class MySQLConnection;
|
||||
class SQLOperation : public ACE_Method_Request
|
||||
{
|
||||
public:
|
||||
SQLOperation(): m_conn(NULL) { }
|
||||
SQLOperation(): m_conn(nullptr) { }
|
||||
int call() override
|
||||
{
|
||||
Execute();
|
||||
|
||||
Reference in New Issue
Block a user