summaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-04-27 21:42:58 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-04-27 21:42:58 +0200
commitd4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50 (patch)
tree474ec7369f0d367d7780f73901d38d1daec4d2eb /src/utils
parent2c14cd30ecbacbd5a808cb2641d40f6d568ec294 (diff)
downloadmanaserv-d4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50.tar.gz
manaserv-d4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50.tar.xz
manaserv-d4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50.zip
Use nullptr instead of NULL everywhere
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/base64.cpp6
-rw-r--r--src/utils/tokencollector.cpp6
-rw-r--r--src/utils/xml.cpp2
-rw-r--r--src/utils/xml.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp
index c0a8753..342c39b 100644
--- a/src/utils/base64.cpp
+++ b/src/utils/base64.cpp
@@ -89,8 +89,8 @@ unsigned char *php_base64_decode(const unsigned char *str, int length, int *ret_
}
result = (unsigned char *)malloc(length + 1);
- if (result == NULL) {
- return NULL;
+ if (result == nullptr) {
+ return nullptr;
}
/* run through the whole string, converting as we go */
@@ -135,7 +135,7 @@ unsigned char *php_base64_decode(const unsigned char *str, int length, int *ret_
case 0:
case 1:
free(result);
- return NULL;
+ return nullptr;
case 2:
k++;
case 3:
diff --git a/src/utils/tokencollector.cpp b/src/utils/tokencollector.cpp
index e41d228..691eca2 100644
--- a/src/utils/tokencollector.cpp
+++ b/src/utils/tokencollector.cpp
@@ -40,7 +40,7 @@ void TokenCollectorBase::insertClient(const std::string &token, intptr_t data)
}
}
- time_t current = time(NULL);
+ time_t current = time(nullptr);
Item item;
item.token = token;
@@ -64,7 +64,7 @@ void TokenCollectorBase::insertConnect(const std::string &token, intptr_t data)
}
}
- time_t current = time(NULL);
+ time_t current = time(nullptr);
Item item;
item.token = token;
@@ -114,7 +114,7 @@ void TokenCollectorBase::removeOutdated(time_t current)
}
TokenCollectorBase::TokenCollectorBase():
- mLastCheck(time(NULL))
+ mLastCheck(time(nullptr))
{
}
diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp
index 91ebb44..3c286db 100644
--- a/src/utils/xml.cpp
+++ b/src/utils/xml.cpp
@@ -138,7 +138,7 @@ namespace XML
if (xmlStrEqual(child->name, BAD_CAST name))
return child;
- return NULL;
+ return nullptr;
}
} // namespace XML
diff --git a/src/utils/xml.h b/src/utils/xml.h
index 2278ce4..801fd70 100644
--- a/src/utils/xml.h
+++ b/src/utils/xml.h
@@ -55,7 +55,7 @@ namespace XML
~Document();
/**
- * Returns the root node of the document (or NULL if there was a
+ * Returns the root node of the document (or nullptr if there was a
* load error).
*/
xmlNodePtr rootNode();