aboutsummaryrefslogtreecommitdiffstats
path: root/src/bancache.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-07-22 18:33:38 +0100
committerGravatar Sadie Powell2022-07-22 18:53:21 +0100
commit648f813f8c89e6e7d0ed5bda2c2149bee2babb09 (patch)
tree5357669e57bb381c80bfdbd24ed4057a99db8e5b /src/bancache.cpp
parentUpdate author list. (diff)
downloadinspircd++-648f813f8c89e6e7d0ed5bda2c2149bee2babb09.tar.gz
inspircd++-648f813f8c89e6e7d0ed5bda2c2149bee2babb09.tar.bz2
inspircd++-648f813f8c89e6e7d0ed5bda2c2149bee2babb09.zip
Switch from NULL to nullptr.
Diffstat (limited to 'src/bancache.cpp')
-rw-r--r--src/bancache.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bancache.cpp b/src/bancache.cpp
index db11840ef..a79c94544 100644
--- a/src/bancache.cpp
+++ b/src/bancache.cpp
@@ -34,8 +34,8 @@ BanCacheHit::BanCacheHit(const std::string& type, const std::string& reason, tim
BanCacheHit *BanCacheManager::AddHit(const std::string &ip, const std::string &type, const std::string &reason, time_t seconds)
{
BanCacheHit*& b = BanHash[ip];
- if (b != NULL) // can't have two cache entries on the same IP, sorry..
- return NULL;
+ if (b != nullptr) // can't have two cache entries on the same IP, sorry..
+ return nullptr;
b = new BanCacheHit(type, reason, (seconds ? seconds : 86400));
return b;
@@ -46,10 +46,10 @@ BanCacheHit *BanCacheManager::GetHit(const std::string &ip)
BanCacheHash::iterator i = this->BanHash.find(ip);
if (i == this->BanHash.end())
- return NULL; // free and safe
+ return nullptr; // free and safe
if (RemoveIfExpired(i))
- return NULL; // expired
+ return nullptr; // expired
return i->second; // hit.
}