summaryrefslogtreecommitdiff
path: root/src/utils/files.cpp
diff options
context:
space:
mode:
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)))