summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-05 19:21:42 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-05 19:21:42 +0300
commitab311005113b2648cf5d709ec2a12baea90ede95 (patch)
treecf79250d77babb1fea16bb007bbd9a5bcae1aa65 /src
parent77cc5e96c21aac8e1572824a7bf9a2c15ea1ba64 (diff)
downloadplus-ab311005113b2648cf5d709ec2a12baea90ede95.tar.gz
plus-ab311005113b2648cf5d709ec2a12baea90ede95.tar.bz2
plus-ab311005113b2648cf5d709ec2a12baea90ede95.tar.xz
plus-ab311005113b2648cf5d709ec2a12baea90ede95.zip
Rename virtlist into list.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/Makefile.am4
-rw-r--r--src/fs/files.cpp6
-rw-r--r--src/fs/virtfs/fs.cpp8
-rw-r--r--src/fs/virtfs/fs.h6
-rw-r--r--src/fs/virtfs/fsdir.cpp4
-rw-r--r--src/fs/virtfs/fsdir.h4
-rw-r--r--src/fs/virtfs/fszip.cpp4
-rw-r--r--src/fs/virtfs/fszip.h4
-rw-r--r--src/fs/virtfs/list.cpp (renamed from src/fs/virtfs/virtlist.cpp)6
-rw-r--r--src/fs/virtfs/list.h (renamed from src/fs/virtfs/virtlist.h)8
-rw-r--r--src/fs/virtfs/tools.cpp6
-rw-r--r--src/fs/virtfs/virtfs1_unittest.cc22
-rw-r--r--src/fs/virtfs/virtfs_unittest.cc14
-rw-r--r--src/gui/theme.cpp4
-rw-r--r--src/resources/wallpaper.cpp4
16 files changed, 56 insertions, 56 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e40749d6c..8ce7e9462 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -895,8 +895,8 @@ SET(SRCS
fs/virtfs/rwops.h
fs/virtfs/tools.cpp
fs/virtfs/tools.h
- fs/virtfs/virtlist.cpp
- fs/virtfs/virtlist.h
+ fs/virtfs/list.cpp
+ fs/virtfs/list.h
fs/virtfs/fs.cpp
fs/virtfs/fs.h
fs/virtfs/rwopstypes.h
@@ -1804,8 +1804,8 @@ SET(DYE_CMD_SRCS
fs/virtfs/rwops.h
fs/virtfs/tools.cpp
fs/virtfs/tools.h
- fs/virtfs/virtlist.cpp
- fs/virtfs/virtlist.h
+ fs/virtfs/list.cpp
+ fs/virtfs/list.h
fs/virtfs/fs.cpp
fs/virtfs/fs.h
fs/virtfs/rwopstypes.h
diff --git a/src/Makefile.am b/src/Makefile.am
index a519e491e..e3ce6bc45 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -583,8 +583,8 @@ BASE_SRC += events/actionevent.h \
fs/virtfs/rwops.h \
fs/virtfs/tools.cpp \
fs/virtfs/tools.h \
- fs/virtfs/virtlist.cpp \
- fs/virtfs/virtlist.h \
+ fs/virtfs/list.cpp \
+ fs/virtfs/list.h \
utils/process.cpp \
utils/process.h \
utils/sdl2helper.cpp \
diff --git a/src/fs/files.cpp b/src/fs/files.cpp
index f0d15a328..e31d331a4 100644
--- a/src/fs/files.cpp
+++ b/src/fs/files.cpp
@@ -26,7 +26,7 @@
#include "fs/virtfs/fs.h"
#include "fs/virtfs/tools.h"
-#include "fs/virtfs/virtlist.h"
+#include "fs/virtfs/list.h"
#endif // defined(ANDROID) || defined(__native_client__)
#include "utils/checkutils.h"
@@ -48,7 +48,7 @@ void Files::extractLocale()
VirtFs::mountZip(fileName2, Append_false);
const std::string localDir = std::string(getenv("APPDIR"));
- VirtFs::VirtList *const rootDirs = VirtFs::enumerateFiles("locale");
+ VirtFs::List *const rootDirs = VirtFs::enumerateFiles("locale");
FOR_EACH (StringVectCIter, i, rootDirs->names)
{
const std::string dir = pathJoin("locale", *i);
@@ -110,7 +110,7 @@ void Files::copyVirtFsDir(const std::string &restrict inDir,
const std::string &restrict outDir)
{
mkdir_r(outDir.c_str());
- VirtFs::VirtList *const files = VirtFs::enumerateFiles(inDir);
+ VirtFs::List *const files = VirtFs::enumerateFiles(inDir);
FOR_EACH (StringVectCIter, i, files->names)
{
const std::string file = pathJoin(inDir, *i);
diff --git a/src/fs/virtfs/fs.cpp b/src/fs/virtfs/fs.cpp
index c4f1e7f42..4d73784dd 100644
--- a/src/fs/virtfs/fs.cpp
+++ b/src/fs/virtfs/fs.cpp
@@ -28,7 +28,7 @@
#include "fs/virtfs/fsdir.h"
#include "fs/virtfs/fsfuncs.h"
#include "fs/virtfs/fszip.h"
-#include "fs/virtfs/virtlist.h"
+#include "fs/virtfs/list.h"
#include "fs/virtfs/virtzipentry.h"
#include "fs/virtfs/zipreader.h"
@@ -136,9 +136,9 @@ namespace VirtFs
return false;
}
- VirtList *enumerateFiles(std::string dirName)
+ List *enumerateFiles(std::string dirName)
{
- VirtList *const list = new VirtList;
+ List *const list = new List;
prepareFsPath(dirName);
if (checkPath(dirName) == false)
{
@@ -258,7 +258,7 @@ namespace VirtFs
return FsDir::isSymbolicLink(name);
}
- void freeList(VirtList *restrict const handle)
+ void freeList(List *restrict const handle)
{
delete handle;
}
diff --git a/src/fs/virtfs/fs.h b/src/fs/virtfs/fs.h
index 8b5df99ef..a6b787d6e 100644
--- a/src/fs/virtfs/fs.h
+++ b/src/fs/virtfs/fs.h
@@ -33,7 +33,7 @@ namespace VirtFs
{
struct File;
struct FsEntry;
- struct VirtList;
+ struct List;
void init(const std::string &restrict name);
void updateDirSeparator();
@@ -41,10 +41,10 @@ namespace VirtFs
const char *getBaseDir();
const char *getUserDir();
bool exists(std::string name);
- VirtList *enumerateFiles(std::string dir) RETURNS_NONNULL;
+ List *enumerateFiles(std::string dir) RETURNS_NONNULL;
bool isDirectory(std::string name);
bool isSymbolicLink(const std::string &restrict name);
- void freeList(VirtList *restrict const handle);
+ void freeList(List *restrict const handle);
File *openRead(std::string filename);
File *openWrite(std::string filename);
File *openAppend(std::string filename);
diff --git a/src/fs/virtfs/fsdir.cpp b/src/fs/virtfs/fsdir.cpp
index f6642fb14..4ee6d648e 100644
--- a/src/fs/virtfs/fsdir.cpp
+++ b/src/fs/virtfs/fsdir.cpp
@@ -28,7 +28,7 @@
#include "fs/virtfs/file.h"
#include "fs/virtfs/fsdirrwops.h"
#include "fs/virtfs/fsfuncs.h"
-#include "fs/virtfs/virtlist.h"
+#include "fs/virtfs/list.h"
#include "utils/checkutils.h"
#include "utils/stringutils.h"
@@ -266,7 +266,7 @@ namespace FsDir
#endif // WIN32
}
- void freeList(VirtList *restrict const handle)
+ void freeList(List *restrict const handle)
{
delete handle;
}
diff --git a/src/fs/virtfs/fsdir.h b/src/fs/virtfs/fsdir.h
index 1abb46211..e57036043 100644
--- a/src/fs/virtfs/fsdir.h
+++ b/src/fs/virtfs/fsdir.h
@@ -33,7 +33,7 @@ namespace VirtFs
struct File;
struct FsEntry;
struct FsFuncs;
-struct VirtList;
+struct List;
namespace FsDir
{
@@ -71,7 +71,7 @@ namespace FsDir
const std::string &dirName,
bool &isDirFlag);
bool isSymbolicLink(std::string name);
- void freeList(VirtList *restrict const handle);
+ void freeList(List *restrict const handle);
bool setWriteDir(std::string newDir);
bool getRealDir(FsEntry *restrict const entry,
const std::string &filename,
diff --git a/src/fs/virtfs/fszip.cpp b/src/fs/virtfs/fszip.cpp
index b114d4740..c3e51cf45 100644
--- a/src/fs/virtfs/fszip.cpp
+++ b/src/fs/virtfs/fszip.cpp
@@ -23,7 +23,7 @@
#include "fs/virtfs/file.h"
#include "fs/virtfs/fsfuncs.h"
#include "fs/virtfs/fsziprwops.h"
-#include "fs/virtfs/virtlist.h"
+#include "fs/virtfs/list.h"
#include "fs/virtfs/virtzipentry.h"
#include "fs/virtfs/zipreader.h"
#include "fs/virtfs/ziplocalheader.h"
@@ -502,7 +502,7 @@ namespace FsZip
return false;
}
- void freeList(VirtList *restrict const handle)
+ void freeList(List *restrict const handle)
{
delete handle;
}
diff --git a/src/fs/virtfs/fszip.h b/src/fs/virtfs/fszip.h
index 03981f0ec..4caffba17 100644
--- a/src/fs/virtfs/fszip.h
+++ b/src/fs/virtfs/fszip.h
@@ -29,7 +29,7 @@ namespace VirtFs
{
struct File;
-struct VirtList;
+struct List;
struct FsFuncs;
struct FsEntry;
@@ -57,7 +57,7 @@ namespace FsZip
bool isDirectory(FsEntry *restrict const entry,
const std::string &dirName,
bool &isDirFlag);
- void freeList(VirtList *restrict const handle);
+ void freeList(List *restrict const handle);
File *openRead(FsEntry *restrict const entry,
const std::string &filename);
File *openWrite(FsEntry *restrict const entry,
diff --git a/src/fs/virtfs/virtlist.cpp b/src/fs/virtfs/list.cpp
index 332968d09..2f0a23d66 100644
--- a/src/fs/virtfs/virtlist.cpp
+++ b/src/fs/virtfs/list.cpp
@@ -18,19 +18,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "fs/virtfs/virtlist.h"
+#include "fs/virtfs/list.h"
#include "debug.h"
namespace VirtFs
{
-VirtList::VirtList() :
+List::List() :
names()
{
}
-VirtList::~VirtList()
+List::~List()
{
}
diff --git a/src/fs/virtfs/virtlist.h b/src/fs/virtfs/list.h
index 7f698e6ad..9dcb9e269 100644
--- a/src/fs/virtfs/virtlist.h
+++ b/src/fs/virtfs/list.h
@@ -28,13 +28,13 @@
namespace VirtFs
{
-struct VirtList final
+struct List final
{
- VirtList();
+ List();
- A_DELETE_COPY(VirtList)
+ A_DELETE_COPY(List)
- ~VirtList();
+ ~List();
StringVect names;
};
diff --git a/src/fs/virtfs/tools.cpp b/src/fs/virtfs/tools.cpp
index ea897e861..a5bf06097 100644
--- a/src/fs/virtfs/tools.cpp
+++ b/src/fs/virtfs/tools.cpp
@@ -25,7 +25,7 @@
#include "fs/paths.h"
#include "fs/virtfs/fs.h"
-#include "fs/virtfs/virtlist.h"
+#include "fs/virtfs/list.h"
#include "utils/stringutils.h"
@@ -40,7 +40,7 @@ namespace VirtFs
const std::string &restrict ext,
const Append append)
{
- VirtList *const list = VirtFs::enumerateFiles(path);
+ List *const list = VirtFs::enumerateFiles(path);
FOR_EACH (StringVectCIter, i, list->names)
{
const std::string str = *i;
@@ -60,7 +60,7 @@ namespace VirtFs
void searchAndRemoveArchives(const std::string &restrict path,
const std::string &restrict ext)
{
- VirtList *const list = VirtFs::enumerateFiles(path);
+ List *const list = VirtFs::enumerateFiles(path);
FOR_EACH (StringVectCIter, i, list->names)
{
const std::string str = *i;
diff --git a/src/fs/virtfs/virtfs1_unittest.cc b/src/fs/virtfs/virtfs1_unittest.cc
index b1084d605..8a219e3ce 100644
--- a/src/fs/virtfs/virtfs1_unittest.cc
+++ b/src/fs/virtfs/virtfs1_unittest.cc
@@ -25,7 +25,7 @@
#include "fs/virtfs/direntry.h"
#include "fs/virtfs/fs.h"
#include "fs/virtfs/rwops.h"
-#include "fs/virtfs/virtlist.h"
+#include "fs/virtfs/list.h"
#include "utils/checkutils.h"
#include "utils/delete2.h"
@@ -673,7 +673,7 @@ TEST_CASE("VirtFs1 getRealDir2")
delete2(logger);
}
-static bool inList(const VirtFs::VirtList *const list,
+static bool inList(const VirtFs::List *const list,
const std::string &name)
{
FOR_EACH (StringVectCIter, it, list->names)
@@ -718,7 +718,7 @@ TEST_CASE("VirtFs1 enumerateFiles1")
VirtFs::mountDirSilent("../data",
Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
const int cnt1 = VirtFs::exists("test/test2.txt") ? 28 : 27;
const int cnt2 = 28;
@@ -763,7 +763,7 @@ TEST_CASE("VirtFs1 enumerateFiles2")
VirtFs::mountDirSilent("../data/test/dir1",
Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
list = VirtFs::enumerateFiles("/");
REQUIRE(list->names.size() == 5);
@@ -788,7 +788,7 @@ TEST_CASE("VirtFs1 enumerateFiles3")
VirtFs::mountDirSilent("../data/test/dir2",
Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
list = VirtFs::enumerateFiles("/");
const size_t sz = list->names.size();
@@ -811,7 +811,7 @@ TEST_CASE("VirtFsZip enumerateFiles4")
VirtFs::mountZip(prefix + "test.zip",
Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
list = VirtFs::enumerateFiles("dir");
REQUIRE(list->names.size() == 2);
@@ -838,7 +838,7 @@ TEST_CASE("VirtFsZip enumerateFiles5")
VirtFs::mountZip(prefix + "test2.zip",
Append_true);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
list = VirtFs::enumerateFiles("dir");
FOR_EACH (StringVectCIter, it, list->names)
@@ -872,7 +872,7 @@ TEST_CASE("VirtFsZip enumerateFiles6")
VirtFs::mountZip(prefix + "test.zip",
Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
list = VirtFs::enumerateFiles("/");
REQUIRE(list->names.size() == 1);
@@ -896,7 +896,7 @@ TEST_CASE("VirtFsZip enumerateFiles7")
VirtFs::mountZip(prefix + "test2.zip",
Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
list = VirtFs::enumerateFiles("/");
REQUIRE(list->names.size() == 4);
@@ -925,7 +925,7 @@ TEST_CASE("VirtFsZip enumerateFiles8")
VirtFs::mountDirSilent(prefix + "data/test",
Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
list = VirtFs::enumerateFiles("dir2");
REQUIRE(list->names.size() >= 6);
@@ -957,7 +957,7 @@ TEST_CASE("VirtFsZip enumerateFiles9")
VirtFs::mountDirSilent(prefix + "data/test",
Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
list = VirtFs::enumerateFiles("dir");
REQUIRE(list->names.size() == 4);
diff --git a/src/fs/virtfs/virtfs_unittest.cc b/src/fs/virtfs/virtfs_unittest.cc
index 3c0b65679..8c7688cb6 100644
--- a/src/fs/virtfs/virtfs_unittest.cc
+++ b/src/fs/virtfs/virtfs_unittest.cc
@@ -24,7 +24,7 @@
#include "fs/paths.h"
#include "fs/virtfs/fs.h"
-#include "fs/virtfs/virtlist.h"
+#include "fs/virtfs/list.h"
#include "utils/checkutils.h"
#include "utils/delete2.h"
@@ -216,7 +216,7 @@ static void removeTemp(StringVect &restrict list)
}
}
-static bool inList(const VirtFs::VirtList *const list,
+static bool inList(const VirtFs::List *const list,
const std::string &name)
{
FOR_EACH (StringVectCIter, it, list->names)
@@ -234,7 +234,7 @@ TEST_CASE("VirtFs enumerateFiles1")
VirtFs::mountDirSilent("data", Append_false);
VirtFs::mountDirSilent("../data", Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
const int cnt1 = VirtFs::exists("test/test2.txt") ? 28 : 27;
const int cnt2 = 28;
@@ -277,7 +277,7 @@ TEST_CASE("VirtFs enumerateFiles2")
VirtFs::mountDirSilent("../data/test/dir1",
Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
list = VirtFs::enumerateFiles("/");
REQUIRE(list->names.size() == 5);
@@ -299,7 +299,7 @@ TEST_CASE("VirtFs enumerateFiles3")
VirtFs::mountZip(prefix + "data/test/test.zip",
Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
list = VirtFs::enumerateFiles("/");
REQUIRE(list->names.size() == 1);
@@ -321,7 +321,7 @@ TEST_CASE("VirtFs enumerateFiles4")
VirtFs::mountZip(prefix + "data/test/test2.zip",
Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
list = VirtFs::enumerateFiles("/");
REQUIRE(list->names.size() == 4);
@@ -347,7 +347,7 @@ TEST_CASE("VirtFs enumerateFiles5")
Append_false);
VirtFs::mountDirSilent(prefix + "data/test", Append_false);
- VirtFs::VirtList *list = nullptr;
+ VirtFs::List *list = nullptr;
list = VirtFs::enumerateFiles("dir2");
REQUIRE(inList(list, "file1.txt"));
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 42ac00d23..8a7b5ff41 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -30,7 +30,7 @@
#include "const/gui/theme.h"
#include "fs/virtfs/fs.h"
-#include "fs/virtfs/virtlist.h"
+#include "fs/virtfs/list.h"
#include "gui/skin.h"
#include "gui/themeinfo.h"
@@ -578,7 +578,7 @@ void Theme::fillFontsList(StringVect &list)
void Theme::fillSoundsList(StringVect &list)
{
- VirtFs::VirtList *const skins = VirtFs::enumerateFiles(
+ VirtFs::List *const skins = VirtFs::enumerateFiles(
branding.getStringValue("systemsounds"));
FOR_EACH (StringVectCIter, i, skins->names)
diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp
index a405298e8..3ee10bdc7 100644
--- a/src/resources/wallpaper.cpp
+++ b/src/resources/wallpaper.cpp
@@ -25,7 +25,7 @@
#include "configuration.h"
#include "fs/virtfs/fs.h"
-#include "fs/virtfs/virtlist.h"
+#include "fs/virtfs/list.h"
#include "resources/wallpaperdata.h"
@@ -85,7 +85,7 @@ void Wallpaper::loadWallpapers()
{
wallpaperData.clear();
initDefaultWallpaperPaths();
- VirtFs::VirtList *const imgs = VirtFs::enumerateFiles(wallpaperPath);
+ VirtFs::List *const imgs = VirtFs::enumerateFiles(wallpaperPath);
FOR_EACH (StringVectCIter, i, imgs->names)
{