summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
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 460db37b..906d2629 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 c5c87f66..b1c93c10 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 45735b46..92a85914 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 3d722a46..569428d4 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);