diff options
-rw-r--r-- | backends/platform/dc/vmsave.cpp | 8 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/gbampsave.cpp | 4 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/gbampsave.h | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/ramsave.cpp | 4 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/ramsave.h | 2 | ||||
-rw-r--r-- | backends/platform/gp2x/graphics.cpp | 3 | ||||
-rw-r--r-- | backends/platform/n64/framfs_save_manager.cpp | 4 | ||||
-rw-r--r-- | backends/platform/n64/framfs_save_manager.h | 2 | ||||
-rw-r--r-- | backends/platform/n64/pakfs_save_manager.cpp | 4 | ||||
-rw-r--r-- | backends/platform/n64/pakfs_save_manager.h | 2 | ||||
-rw-r--r-- | backends/platform/ps2/savefilemgr.cpp | 6 | ||||
-rw-r--r-- | backends/platform/ps2/savefilemgr.h | 2 | ||||
-rw-r--r-- | backends/plugins/dc/dc-provider.h | 2 | ||||
-rw-r--r-- | backends/plugins/psp/psp-provider.h | 2 | ||||
-rw-r--r-- | backends/plugins/win32/win32-provider.h | 2 | ||||
-rw-r--r-- | backends/saves/default/default-saves.cpp | 6 | ||||
-rw-r--r-- | backends/saves/default/default-saves.h | 2 |
17 files changed, 29 insertions, 28 deletions
diff --git a/backends/platform/dc/vmsave.cpp b/backends/platform/dc/vmsave.cpp index 5068370ce6..07ac9460ec 100644 --- a/backends/platform/dc/vmsave.cpp +++ b/backends/platform/dc/vmsave.cpp @@ -189,7 +189,7 @@ static bool matches(const char *glob, const char *name) return !*name; } -static void tryList(const char *glob, int vm, Common::StringList &list) +static void tryList(const char *glob, int vm, Common::StringArray &list) { struct vmsinfo info; struct superblock super; @@ -335,7 +335,7 @@ public: return ::deleteSaveGame(filename.c_str()); } - virtual Common::StringList listSavefiles(const Common::String &pattern); + virtual Common::StringArray listSavefiles(const Common::String &pattern); }; void OutVMSave::finalize() @@ -420,9 +420,9 @@ uint32 OutVMSave::write(const void *buf, uint32 cnt) } -Common::StringList VMSaveManager::listSavefiles(const Common::String &pattern) +Common::StringArray VMSaveManager::listSavefiles(const Common::String &pattern) { - Common::StringList list; + Common::StringArray list; for (int i=0; i<24; i++) tryList(pattern.c_str(), i, list); diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp index 3ca0bb3bb8..820e569555 100644 --- a/backends/platform/ds/arm9/source/gbampsave.cpp +++ b/backends/platform/ds/arm9/source/gbampsave.cpp @@ -180,7 +180,7 @@ const char *GBAMPSaveFileManager::getSavePath() const { return dir; } -Common::StringList GBAMPSaveFileManager::listSavefiles(const Common::String &pattern) { +Common::StringArray GBAMPSaveFileManager::listSavefiles(const Common::String &pattern) { enum { TYPE_NO_MORE = 0, TYPE_FILE = 1, TYPE_DIR = 2 }; char name[256]; @@ -212,7 +212,7 @@ Common::StringList GBAMPSaveFileManager::listSavefiles(const Common::String &pat int fileType = FAT_FindFirstFileLFN(name); - Common::StringList list; + Common::StringArray list; do { diff --git a/backends/platform/ds/arm9/source/gbampsave.h b/backends/platform/ds/arm9/source/gbampsave.h index e45065df42..bc4fdaa1a4 100644 --- a/backends/platform/ds/arm9/source/gbampsave.h +++ b/backends/platform/ds/arm9/source/gbampsave.h @@ -70,7 +70,7 @@ public: virtual Common::InSaveFile* openForLoading(const Common::String &filename) { return openSavefile(filename.c_str(), false); } virtual bool removeSavefile(const Common::String &filename) { return false; } // TODO: Implement this - virtual Common::StringList listSavefiles(const Common::String &pattern); + virtual Common::StringArray listSavefiles(const Common::String &pattern); void deleteFile(const Common::String &name); void listFiles(); diff --git a/backends/platform/ds/arm9/source/ramsave.cpp b/backends/platform/ds/arm9/source/ramsave.cpp index f38e36250e..a0f4633988 100644 --- a/backends/platform/ds/arm9/source/ramsave.cpp +++ b/backends/platform/ds/arm9/source/ramsave.cpp @@ -402,10 +402,10 @@ bool DSSaveFileManager::removeSavefile(const Common::String &filename) { } -Common::StringList DSSaveFileManager::listSavefiles(const Common::String &pattern) { +Common::StringArray DSSaveFileManager::listSavefiles(const Common::String &pattern) { consolePrintf("DSSaveFileManager::listSavefiles : Not implemented yet.\n"); assert(false); - return Common::StringList(); + return Common::StringArray(); /* TODO: Implement this. If you don't understand what it should do, just ask (e.g. on scummvm-devel or Fingolfin). It should be pretty simple if you diff --git a/backends/platform/ds/arm9/source/ramsave.h b/backends/platform/ds/arm9/source/ramsave.h index 47172d7844..e74df94952 100644 --- a/backends/platform/ds/arm9/source/ramsave.h +++ b/backends/platform/ds/arm9/source/ramsave.h @@ -126,7 +126,7 @@ public: virtual Common::InSaveFile* openForLoading(const Common::String &filename) { return openSavefile(filename.c_str(), false); } virtual bool removeSavefile(const Common::String &filename); - virtual Common::StringList listSavefiles(const Common::String &pattern); + virtual Common::StringArray listSavefiles(const Common::String &pattern); void flushToSaveRAM(); diff --git a/backends/platform/gp2x/graphics.cpp b/backends/platform/gp2x/graphics.cpp index 34108367cf..8f6f67c5d6 100644 --- a/backends/platform/gp2x/graphics.cpp +++ b/backends/platform/gp2x/graphics.cpp @@ -31,6 +31,7 @@ #include "backends/platform/gp2x/gp2x-common.h" #include "common/util.h" #include "common/mutex.h" +#include "common/str-array.h" #include "graphics/font.h" #include "graphics/fontman.h" #include "graphics/scaler.h" @@ -1642,7 +1643,7 @@ void OSystem_GP2X::displayMessageOnOSD(const char *msg) { SDL_FillRect(_osdSurface, 0, kOSDColorKey); // Split the message into separate lines. - Common::StringList lines; + Common::StringArray lines; const char *ptr; for (ptr = msg; *ptr; ++ptr) { if (*ptr == '\n') { diff --git a/backends/platform/n64/framfs_save_manager.cpp b/backends/platform/n64/framfs_save_manager.cpp index 2782943a3b..053ed741b3 100644 --- a/backends/platform/n64/framfs_save_manager.cpp +++ b/backends/platform/n64/framfs_save_manager.cpp @@ -53,10 +53,10 @@ uint32 OutFRAMSave::write(const void *buf, uint32 cnt) { return framfs_write(buf, 1, cnt, fd); } -Common::StringList FRAMSaveManager::listSavefiles(const Common::String &pattern) { +Common::StringArray FRAMSaveManager::listSavefiles(const Common::String &pattern) { FRAMDIR *dirp = framfs_opendir(); framfs_dirent *dp; - Common::StringList list; + Common::StringArray list; Common::String *fname; while ((dp = framfs_readdir(dirp)) != NULL) { diff --git a/backends/platform/n64/framfs_save_manager.h b/backends/platform/n64/framfs_save_manager.h index b0adfa7728..376bdf1051 100644 --- a/backends/platform/n64/framfs_save_manager.h +++ b/backends/platform/n64/framfs_save_manager.h @@ -127,7 +127,7 @@ public: return ::fram_deleteSaveGame(filename.c_str()); } - virtual Common::StringList listSavefiles(const Common::String &pattern); + virtual Common::StringArray listSavefiles(const Common::String &pattern); }; diff --git a/backends/platform/n64/pakfs_save_manager.cpp b/backends/platform/n64/pakfs_save_manager.cpp index df21a11fd2..25d82826e5 100644 --- a/backends/platform/n64/pakfs_save_manager.cpp +++ b/backends/platform/n64/pakfs_save_manager.cpp @@ -54,10 +54,10 @@ uint32 OutPAKSave::write(const void *buf, uint32 cnt) { return pakfs_write(buf, 1, cnt, fd); } -Common::StringList PAKSaveManager::listSavefiles(const Common::String &pattern) { +Common::StringArray PAKSaveManager::listSavefiles(const Common::String &pattern) { PAKDIR *dirp = pakfs_opendir(); pakfs_dirent *dp; - Common::StringList list; + Common::StringArray list; Common::String *fname; while ((dp = pakfs_readdir(dirp)) != NULL) { diff --git a/backends/platform/n64/pakfs_save_manager.h b/backends/platform/n64/pakfs_save_manager.h index dda5ec0a7d..b0af464b3a 100644 --- a/backends/platform/n64/pakfs_save_manager.h +++ b/backends/platform/n64/pakfs_save_manager.h @@ -128,7 +128,7 @@ public: return ::pakfs_deleteSaveGame(filename.c_str()); } - virtual Common::StringList listSavefiles(const Common::String &pattern); + virtual Common::StringArray listSavefiles(const Common::String &pattern); }; diff --git a/backends/platform/ps2/savefilemgr.cpp b/backends/platform/ps2/savefilemgr.cpp index 192e3a4b7e..a4b3ddb971 100644 --- a/backends/platform/ps2/savefilemgr.cpp +++ b/backends/platform/ps2/savefilemgr.cpp @@ -228,7 +228,7 @@ bool Ps2SaveFileManager::removeSavefile(const Common::String &filename) { return true; } -Common::StringList Ps2SaveFileManager::listSavefiles(const Common::String &pattern) { +Common::StringArray Ps2SaveFileManager::listSavefiles(const Common::String &pattern) { Common::FSNode savePath(ConfMan.get("savepath")); // TODO: is this fast? Common::String _dir; Common::String search; @@ -237,7 +237,7 @@ Common::StringList Ps2SaveFileManager::listSavefiles(const Common::String &patte char *game=0, path[32], temp[32]; if (!savePath.exists() || !savePath.isDirectory()) - return Common::StringList(); + return Common::StringArray(); printf("listSavefiles = %s\n", pattern.c_str()); @@ -260,7 +260,7 @@ Common::StringList Ps2SaveFileManager::listSavefiles(const Common::String &patte Common::FSDirectory dir(_dir); Common::ArchiveMemberList savefiles; - Common::StringList results; + Common::StringArray results; printf("dir = %s --- reg = %s\n", _dir.c_str(), search.c_str()); diff --git a/backends/platform/ps2/savefilemgr.h b/backends/platform/ps2/savefilemgr.h index b1599c70f6..a87f53d80c 100644 --- a/backends/platform/ps2/savefilemgr.h +++ b/backends/platform/ps2/savefilemgr.h @@ -39,7 +39,7 @@ public: virtual Common::InSaveFile *openForLoading(const Common::String &filename); virtual Common::OutSaveFile *openForSaving(const Common::String &filename); - virtual Common::StringList listSavefiles(const Common::String &pattern); + virtual Common::StringArray listSavefiles(const Common::String &pattern); virtual bool removeSavefile(const Common::String &filename); // void writeSaveNonblocking(char *name, void *buf, uint32 size); diff --git a/backends/plugins/dc/dc-provider.h b/backends/plugins/dc/dc-provider.h index 470a586a51..ac10665419 100644 --- a/backends/plugins/dc/dc-provider.h +++ b/backends/plugins/dc/dc-provider.h @@ -36,7 +36,7 @@ protected: bool isPluginFilename(const Common::FSNode &node) const; - virtual void addCustomDirectories(Common::StringList &dirs) const { + virtual void addCustomDirectories(Common::StringArray &dirs) const { dirs.push_back("/"); } }; diff --git a/backends/plugins/psp/psp-provider.h b/backends/plugins/psp/psp-provider.h index 33271d0b89..ef2222076a 100644 --- a/backends/plugins/psp/psp-provider.h +++ b/backends/plugins/psp/psp-provider.h @@ -36,7 +36,7 @@ protected: bool isPluginFilename(const Common::FSNode &node) const; - virtual void addCustomDirectories(Common::StringList &dirs) const { + virtual void addCustomDirectories(Common::StringArray &dirs) const { dirs.push_back("/"); } }; diff --git a/backends/plugins/win32/win32-provider.h b/backends/plugins/win32/win32-provider.h index d6e146371a..56fa35810c 100644 --- a/backends/plugins/win32/win32-provider.h +++ b/backends/plugins/win32/win32-provider.h @@ -36,7 +36,7 @@ protected: bool isPluginFilename(const Common::FSNode &node) const; - virtual void addCustomDirectories(Common::StringList &dirs) const {} + virtual void addCustomDirectories(Common::StringArray &dirs) const {} }; #endif // defined(DYNAMIC_MODULES) && defined(_WIN32) diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp index 70b9977d8f..1ab898d2d6 100644 --- a/backends/saves/default/default-saves.cpp +++ b/backends/saves/default/default-saves.cpp @@ -54,18 +54,18 @@ void DefaultSaveFileManager::checkPath(const Common::FSNode &dir) { } } -Common::StringList DefaultSaveFileManager::listSavefiles(const Common::String &pattern) { +Common::StringArray DefaultSaveFileManager::listSavefiles(const Common::String &pattern) { Common::String savePathName = getSavePath(); checkPath(Common::FSNode(savePathName)); if (getError() != Common::kNoError) - return Common::StringList(); + return Common::StringArray(); // recreate FSNode since checkPath may have changed/created the directory Common::FSNode savePath(savePathName); Common::FSDirectory dir(savePath); Common::ArchiveMemberList savefiles; - Common::StringList results; + Common::StringArray results; Common::String search(pattern); if (dir.listMatchingMembers(savefiles, search) > 0) { diff --git a/backends/saves/default/default-saves.h b/backends/saves/default/default-saves.h index 6fe250f9b2..ea3d9e6d44 100644 --- a/backends/saves/default/default-saves.h +++ b/backends/saves/default/default-saves.h @@ -39,7 +39,7 @@ public: DefaultSaveFileManager(); DefaultSaveFileManager(const Common::String &defaultSavepath); - virtual Common::StringList listSavefiles(const Common::String &pattern); + virtual Common::StringArray listSavefiles(const Common::String &pattern); virtual Common::InSaveFile *openForLoading(const Common::String &filename); virtual Common::OutSaveFile *openForSaving(const Common::String &filename); virtual bool removeSavefile(const Common::String &filename); |