diff options
author | Alyssa Milburn | 2013-06-06 21:41:14 +0200 |
---|---|---|
committer | Alyssa Milburn | 2013-06-06 21:41:14 +0200 |
commit | 7840b5e4b9e83270b8df5d8f57f292672163bfe5 (patch) | |
tree | eca55990ce0df6808904a0b656867fe9f742485e /common | |
parent | 1d0df533551cb891c9734fe0da0e3ac20a311fe1 (diff) | |
download | scummvm-rg350-7840b5e4b9e83270b8df5d8f57f292672163bfe5.tar.gz scummvm-rg350-7840b5e4b9e83270b8df5d8f57f292672163bfe5.tar.bz2 scummvm-rg350-7840b5e4b9e83270b8df5d8f57f292672163bfe5.zip |
COMMON: Add depth/flat parameters to addSubDirectoryMatching.
Diffstat (limited to 'common')
-rw-r--r-- | common/archive.cpp | 6 | ||||
-rw-r--r-- | common/archive.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/common/archive.cpp b/common/archive.cpp index 1323f14805..57ebeb2ca6 100644 --- a/common/archive.cpp +++ b/common/archive.cpp @@ -118,7 +118,7 @@ void SearchSet::addDirectory(const String &name, const FSNode &dir, int priority add(name, new FSDirectory(dir, depth, flat), priority); } -void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority) { +void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority, int depth, bool flat) { FSList subDirs; if (!directory.getChildren(subDirs)) return; @@ -161,9 +161,9 @@ void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String origPa } if (nextPattern.empty()) - addDirectory(name, *i, priority); + addDirectory(name, *i, priority, depth, flat); else - addSubDirectoriesMatching(*i, nextPattern, ignoreCase, priority); + addSubDirectoriesMatching(*i, nextPattern, ignoreCase, priority, depth, flat); } } } diff --git a/common/archive.h b/common/archive.h index ffd86d786d..2f9736f032 100644 --- a/common/archive.h +++ b/common/archive.h @@ -184,8 +184,8 @@ public: * to assume that this method is using anything other than a simple case insensitive compare. * Thus do not use any tokens like '*' or '?' in the "caselessName" parameter of this function! */ - void addSubDirectoryMatching(const FSNode &directory, const String &caselessName, int priority = 0) { - addSubDirectoriesMatching(directory, caselessName, true, priority); + void addSubDirectoryMatching(const FSNode &directory, const String &caselessName, int priority = 0, int depth = 1, bool flat = false) { + addSubDirectoriesMatching(directory, caselessName, true, priority, depth, flat); } /** @@ -208,7 +208,7 @@ public: * * @see Common::matchString */ - void addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority = 0); + void addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority = 0, int depth = 1, bool flat = false); /** * Remove an archive from the searchable set. |