summaryrefslogtreecommitdiffstats
path: root/src/common
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/common
parent2c14cd30ecbacbd5a808cb2641d40f6d568ec294 (diff)
downloadmanaserv-d4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50.tar.gz
manaserv-d4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50.tar.xz
manaserv-d4f3105d9a879f27baad6e43b8b3cb6fe2f0ef50.zip
Use nullptr instead of NULL everywhere
Diffstat (limited to 'src/common')
-rw-r--r--src/common/configuration.cpp2
-rw-r--r--src/common/permissionmanager.cpp2
-rw-r--r--src/common/resourcemanager.cpp6
-rw-r--r--src/common/resourcemanager.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/common/configuration.cpp b/src/common/configuration.cpp
index 460db37..906d262 100644
--- a/src/common/configuration.cpp
+++ b/src/common/configuration.cpp
@@ -57,7 +57,7 @@ static bool readFile(const std::string &fileName)
return false;
}
- for (node = node->xmlChildrenNode; node != NULL; node = node->next)
+ for (node = node->xmlChildrenNode; node != nullptr; node = node->next)
{
if (xmlStrEqual(node->name, BAD_CAST "include"))
{
diff --git a/src/common/permissionmanager.cpp b/src/common/permissionmanager.cpp
index c5c87f6..b1c93c1 100644
--- a/src/common/permissionmanager.cpp
+++ b/src/common/permissionmanager.cpp
@@ -83,7 +83,7 @@ void PermissionManager::reload()
xmlNodePtr perNode;
- for (perNode = node->xmlChildrenNode; perNode != NULL; perNode = perNode->next)
+ for (perNode = node->xmlChildrenNode; perNode != nullptr; perNode = perNode->next)
{
if (xmlStrEqual(perNode->name, BAD_CAST "allow"))
{
diff --git a/src/common/resourcemanager.cpp b/src/common/resourcemanager.cpp
index 45735b4..92a8591 100644
--- a/src/common/resourcemanager.cpp
+++ b/src/common/resourcemanager.cpp
@@ -91,11 +91,11 @@ char *ResourceManager::loadFile(const std::string &fileName, int &fileSize)
PHYSFS_file *file = PHYSFS_openRead(fileName.c_str());
// If the handler is an invalid pointer indicate failure
- if (file == NULL)
+ if (file == nullptr)
{
LOG_WARN("Failed to load '" << fileName << "': "
<< PHYSFS_getLastError());
- return NULL;
+ return nullptr;
}
// Get the size of the file
@@ -108,7 +108,7 @@ char *ResourceManager::loadFile(const std::string &fileName, int &fileSize)
free(buffer);
LOG_WARN("Failed to load '" << fileName << "': "
<< PHYSFS_getLastError());
- return NULL;
+ return nullptr;
}
// Close the file and let the user deallocate the memory
diff --git a/src/common/resourcemanager.h b/src/common/resourcemanager.h
index 3d722a4..569428d 100644
--- a/src/common/resourcemanager.h
+++ b/src/common/resourcemanager.h
@@ -56,7 +56,7 @@ namespace ResourceManager
* @param fileSize The size of the file that was loaded.
*
* @return An allocated byte array containing the data that was loaded,
- * or <code>NULL</code> on failure.
+ * or <code>nullptr</code> on failure.
* @note The array contains an extra \0 character at position fileSize.
*/
char *loadFile(const std::string &fileName, int &fileSize);