summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-18 22:39:29 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-18 22:39:29 +0300
commit6419386c4c382753509425826ee609dd07d4ae72 (patch)
treef5f6d54f86a86a21a8145891797a561f5bb8e8d8 /src/resources
parent78744020528ef6231e1606bbe2e8c53011c77935 (diff)
downloadmanaplus-6419386c4c382753509425826ee609dd07d4ae72.tar.gz
manaplus-6419386c4c382753509425826ee609dd07d4ae72.tar.bz2
manaplus-6419386c4c382753509425826ee609dd07d4ae72.tar.xz
manaplus-6419386c4c382753509425826ee609dd07d4ae72.zip
add const to other files.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/iteminfo.h2
-rw-r--r--src/resources/resource.h2
-rw-r--r--src/resources/sounddb.cpp2
-rw-r--r--src/resources/spritedef.cpp2
-rw-r--r--src/resources/spritedef.h2
-rw-r--r--src/resources/wallpaper.cpp2
6 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index 7e2dd1bff..01522ef7b 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -295,7 +295,7 @@ class ItemInfo final
Cursor::Cursor getPickupCursor() const A_WARN_UNUSED
{ return mPickupCursor; }
- void setProtected(bool b)
+ void setProtected(const bool b)
{ mProtected = b; }
bool isProtected() const
diff --git a/src/resources/resource.h b/src/resources/resource.h
index a60d6765c..cdcac1b8f 100644
--- a/src/resources/resource.h
+++ b/src/resources/resource.h
@@ -96,7 +96,7 @@ class Resource
bool isProtected() const
{ return mProtected; }
- void setNotCount(bool b)
+ void setNotCount(const bool b)
{ mNotCount = b; }
#ifdef DEBUG_DUMP_LEAKS
diff --git a/src/resources/sounddb.cpp b/src/resources/sounddb.cpp
index 71e1a01e4..7b0d078e1 100644
--- a/src/resources/sounddb.cpp
+++ b/src/resources/sounddb.cpp
@@ -39,7 +39,7 @@ void SoundDB::load()
unload();
XML::Document *doc = new XML::Document(paths.getStringValue("soundsFile"));
- XmlNodePtr root = doc->rootNode();
+ const XmlNodePtr root = doc->rootNode();
if (!root || !xmlNameEqual(root, "sounds"))
{
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index 78c456878..89450486d 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -493,7 +493,7 @@ bool SpriteDef::addSequence(const int start, const int end, const int delay,
const int offsetX, const int offsetY,
const int variant_offset,
int repeat, const int rand,
- ImageSet *const imageSet,
+ const ImageSet *const imageSet,
Animation *const animation) const
{
if (!imageSet || !animation)
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index 26c768776..6ef64bbae 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -163,7 +163,7 @@ class SpriteDef final : public Resource
const int offsetX, const int offsetY,
const int variant_offset,
int repeat, const int rand,
- ImageSet *const imageSet,
+ const ImageSet *const imageSet,
Animation *const animation) const;
private:
diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp
index 0bbbbfa2a..513e1c8fc 100644
--- a/src/resources/wallpaper.cpp
+++ b/src/resources/wallpaper.cpp
@@ -93,7 +93,7 @@ void Wallpaper::loadWallpapers()
{
wallpaperData.clear();
initDefaultWallpaperPaths();
- char **imgs = PhysFs::enumerateFiles(wallpaperPath.c_str());
+ char **const imgs = PhysFs::enumerateFiles(wallpaperPath.c_str());
for (char **i = imgs; *i; i++)
{