refactor(Core): apply clang-tidy modernize-use-nullptr (#3819)

This commit is contained in:
Francesco Borzì
2020-12-06 20:55:11 +01:00
committed by GitHub
parent 161302252e
commit cba126fa84
40 changed files with 127 additions and 127 deletions

View File

@@ -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)

View File

@@ -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); }

View File

@@ -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()

View File

@@ -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();