summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/resources/db/colordb.cpp2
-rw-r--r--src/resources/db/itemdb.cpp2
-rw-r--r--src/resources/resourcemanager.cpp1
-rw-r--r--src/utils/base64.cpp4
4 files changed, 4 insertions, 5 deletions
diff --git a/src/resources/db/colordb.cpp b/src/resources/db/colordb.cpp
index 1236a35f1..630c1c902 100644
--- a/src/resources/db/colordb.cpp
+++ b/src/resources/db/colordb.cpp
@@ -78,7 +78,7 @@ void ColorDB::loadHair(const std::string &fileName,
std::map<int, ItemColor> &colors)
{
XML::Document *doc = new XML::Document(fileName);
- XmlNodePtrConst root = doc->rootNode();
+ const XmlNodePtrConst root = doc->rootNode();
if (!root || !xmlNameEqual(root, "colors"))
{
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index 9865cc3ef..abc164493 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -225,7 +225,7 @@ void ItemDB::load()
void ItemDB::loadXmlFile(const std::string &fileName, int &tagNum)
{
XML::Document doc(fileName);
- const XmlNodePtr rootNode = doc.rootNode();
+ const XmlNodePtrConst rootNode = doc.rootNode();
if (!rootNode || !xmlNameEqual(rootNode, "items"))
{
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index fa0717622..6b87e6cdf 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -892,7 +892,6 @@ void ResourceManager::decRefDelete(Resource *const res)
if (!res)
return;
- bool found(false);
const int count = res->getRefCount();
if (count == 1)
{
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp
index f887a9e1b..bd20496b3 100644
--- a/src/utils/base64.cpp
+++ b/src/utils/base64.cpp
@@ -178,7 +178,7 @@ unsigned char *php3_base64_decode(const unsigned char *restrict const string,
std::string encodeBase64String(std::string value)
{
int sz = 0;
- unsigned char *str = reinterpret_cast<unsigned char*>(
+ const unsigned char *const str = reinterpret_cast<unsigned char*>(
const_cast<char*>(value.c_str()));
unsigned char *const buf = php3_base64_encode(str, value.size(), &sz);
if (!buf)
@@ -192,7 +192,7 @@ std::string encodeBase64String(std::string value)
std::string decodeBase64String(std::string value)
{
int sz = 0;
- unsigned char *str = reinterpret_cast<unsigned char*>(
+ const unsigned char *const str = reinterpret_cast<unsigned char*>(
const_cast<char*>(value.c_str()));
unsigned char *const buf = php3_base64_decode(str, value.size(), &sz);