summaryrefslogtreecommitdiff
path: root/src/utils/files.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-20 21:20:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-20 21:20:59 +0300
commit21069ec1635bd24ab33805e033d28f2c0b2de482 (patch)
treefaaa3b2cdebc89b0202151b27595864535395585 /src/utils/files.cpp
parent65c3c7a8ac6437d507597b840fc20dc1cad5fbf1 (diff)
downloadmanaplus-21069ec1635bd24ab33805e033d28f2c0b2de482.tar.gz
manaplus-21069ec1635bd24ab33805e033d28f2c0b2de482.tar.bz2
manaplus-21069ec1635bd24ab33805e033d28f2c0b2de482.tar.xz
manaplus-21069ec1635bd24ab33805e033d28f2c0b2de482.zip
Add missing const in utils directory.
Diffstat (limited to 'src/utils/files.cpp')
-rw-r--r--src/utils/files.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/files.cpp b/src/utils/files.cpp
index 6408a8061..ae56c70da 100644
--- a/src/utils/files.cpp
+++ b/src/utils/files.cpp
@@ -210,7 +210,7 @@ int Files::copyFile(const std::string &restrict srcName,
void Files::getFiles(const std::string &path, StringVect &list)
{
- char **fonts = PhysFs::enumerateFiles(path.c_str());
+ char **const fonts = PhysFs::enumerateFiles(path.c_str());
for (char *const *i = fonts; *i; i++)
{
if (!PhysFs::isDirectory((path + *i).c_str()))
@@ -221,7 +221,7 @@ void Files::getFiles(const std::string &path, StringVect &list)
void Files::getDirs(const std::string &path, StringVect &list)
{
- char **fonts = PhysFs::enumerateFiles(path.c_str());
+ char **const fonts = PhysFs::enumerateFiles(path.c_str());
for (char *const *i = fonts; *i; i++)
{
if (PhysFs::isDirectory((path + *i).c_str()))
@@ -232,7 +232,7 @@ void Files::getDirs(const std::string &path, StringVect &list)
void Files::getFilesWithDir(const std::string &path, StringVect &list)
{
- char **fonts = PhysFs::enumerateFiles(path.c_str());
+ char **const fonts = PhysFs::enumerateFiles(path.c_str());
for (char *const *i = fonts; *i; i++)
{
if (!PhysFs::isDirectory((path + *i).c_str()))
@@ -353,7 +353,7 @@ void Files::saveTextFile(std::string path,
void Files::deleteFilesInDirectory(std::string path)
{
path += "/";
- struct dirent *next_file = nullptr;
+ const struct dirent *next_file = nullptr;
DIR *const dir = opendir(path.c_str());
while ((next_file = readdir(dir)))