summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-06-26 18:18:01 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-06-26 20:45:30 -0700
commitec21450522e3c2124f3510eef5cfd88420483248 (patch)
tree2d3dbd342dccd34bc3545ae3ab7902042abe6815 /src/char
parent296629e067563e82b4a08b2a785d1c2f13b5a285 (diff)
downloadtmwa-ec21450522e3c2124f3510eef5cfd88420483248.tar.gz
tmwa-ec21450522e3c2124f3510eef5cfd88420483248.tar.bz2
tmwa-ec21450522e3c2124f3510eef5cfd88420483248.tar.xz
tmwa-ec21450522e3c2124f3510eef5cfd88420483248.zip
Low hanging fruit
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.cpp14
-rw-r--r--src/char/int_storage.cpp2
-rw-r--r--src/char/inter.cpp2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/char/char.cpp b/src/char/char.cpp
index a0a92f1..3b0d43e 100644
--- a/src/char/char.cpp
+++ b/src/char/char.cpp
@@ -1083,7 +1083,7 @@ int set_account_reg2(AccountId acc, Slice<GlobalReg> reg)
static
int char_divorce(CharPair *cp)
{
- if (cp == NULL)
+ if (cp == nullptr)
return 0;
CharKey *ck = &cp->key;
@@ -2465,7 +2465,7 @@ void parse_char(Session *s)
else
PRINTF("Account Logged On; Account ID: %d.\n"_fmt,
account_id);
- if (sd == NULL)
+ if (sd == nullptr)
{
s->session_data = make_unique<char_session_data, SessionDeleter>();
sd = static_cast<char_session_data *>(s->session_data.get());
@@ -2833,14 +2833,14 @@ void check_connect_login_server(TimerData *, tick_t)
static
bool char_lan_config(XString w1, ZString w2)
{
- struct hostent *h = NULL;
+ struct hostent *h = nullptr;
{
if (w1 == "lan_map_ip"_s)
{
// Read map-server Lan IP Address
h = gethostbyname(w2.c_str());
- if (h != NULL)
+ if (h != nullptr)
{
lan_map_ip = IP4Address({
static_cast<uint8_t>(h->h_addr[0]),
@@ -2894,7 +2894,7 @@ bool lan_check()
static
bool char_config(XString w1, ZString w2)
{
- struct hostent *h = NULL;
+ struct hostent *h = nullptr;
{
if (w1 == "userid"_s)
@@ -2914,7 +2914,7 @@ bool char_config(XString w1, ZString w2)
else if (w1 == "login_ip"_s)
{
h = gethostbyname(w2.c_str());
- if (h != NULL)
+ if (h != nullptr)
{
login_ip = IP4Address({
static_cast<uint8_t>(h->h_addr[0]),
@@ -2938,7 +2938,7 @@ bool char_config(XString w1, ZString w2)
else if (w1 == "char_ip"_s)
{
h = gethostbyname(w2.c_str());
- if (h != NULL)
+ if (h != nullptr)
{
char_ip = IP4Address({
static_cast<uint8_t>(h->h_addr[0]),
diff --git a/src/char/int_storage.cpp b/src/char/int_storage.cpp
index 9527806..784347b 100644
--- a/src/char/int_storage.cpp
+++ b/src/char/int_storage.cpp
@@ -116,7 +116,7 @@ bool extract(XString str, Storage *p)
Storage *account2storage(AccountId account_id)
{
Storage *s = storage_db.search(account_id);
- if (s == NULL)
+ if (s == nullptr)
{
s = storage_db.init(account_id);
s->account_id = account_id;
diff --git a/src/char/inter.cpp b/src/char/inter.cpp
index 04c1146..354cba7 100644
--- a/src/char/inter.cpp
+++ b/src/char/inter.cpp
@@ -406,7 +406,7 @@ RecvResult mapif_parse_AccReg(Session *s)
struct accreg *reg = accreg_db.search(head.account_id);
- if (reg == NULL)
+ if (reg == nullptr)
{
AccountId account_id = head.account_id;
reg = accreg_db.init(account_id);