summaryrefslogtreecommitdiff
path: root/src/char/char.cpp
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/char.cpp
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/char.cpp')
-rw-r--r--src/char/char.cpp14
1 files changed, 7 insertions, 7 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]),