JANITORIAL: Remove redundant namespace specs
This commit is contained in:
parent
82e21f3c3c
commit
f262e71eb4
2 changed files with 14 additions and 14 deletions
|
@ -28,24 +28,24 @@
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
|
||||||
struct ArchiveMemberListBackComparator {
|
struct ArchiveMemberListBackComparator {
|
||||||
bool operator()(const Common::ArchiveMemberPtr &a, const Common::ArchiveMemberPtr &b) {
|
bool operator()(const ArchiveMemberPtr &a, const ArchiveMemberPtr &b) {
|
||||||
return a->getName() > b->getName();
|
return a->getName() > b->getName();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
bool generateZipSet(Common::SearchSet &searchSet, const char *defaultFile, const char *packsMask, const char *packsPath) {
|
bool generateZipSet(SearchSet &searchSet, const char *defaultFile, const char *packsMask, const char *packsPath) {
|
||||||
Common::Archive *dat;
|
Archive *dat;
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
|
|
||||||
if (!ConfMan.get(packsPath).empty()) {
|
if (!ConfMan.get(packsPath).empty()) {
|
||||||
Common::FSDirectory *iconDir = new Common::FSDirectory(ConfMan.get(packsPath));
|
FSDirectory *iconDir = new FSDirectory(ConfMan.get(packsPath));
|
||||||
Common::ArchiveMemberList iconFiles;
|
ArchiveMemberList iconFiles;
|
||||||
|
|
||||||
iconDir->listMatchingMembers(iconFiles, packsMask);
|
iconDir->listMatchingMembers(iconFiles, packsMask);
|
||||||
Common::sort(iconFiles.begin(), iconFiles.end(), ArchiveMemberListBackComparator());
|
sort(iconFiles.begin(), iconFiles.end(), ArchiveMemberListBackComparator());
|
||||||
|
|
||||||
for (Common::ArchiveMemberList::iterator ic = iconFiles.begin(); ic != iconFiles.end(); ++ic) {
|
for (ArchiveMemberList::iterator ic = iconFiles.begin(); ic != iconFiles.end(); ++ic) {
|
||||||
dat = Common::makeZipArchive((*ic)->createReadStream());
|
dat = makeZipArchive((*ic)->createReadStream());
|
||||||
|
|
||||||
if (dat) {
|
if (dat) {
|
||||||
searchSet.add((*ic)->getName(), dat);
|
searchSet.add((*ic)->getName(), dat);
|
||||||
|
@ -60,17 +60,17 @@ bool generateZipSet(Common::SearchSet &searchSet, const char *defaultFile, const
|
||||||
dat = nullptr;
|
dat = nullptr;
|
||||||
|
|
||||||
if (ConfMan.hasKey("themepath")) {
|
if (ConfMan.hasKey("themepath")) {
|
||||||
Common::FSNode *fs = new Common::FSNode(normalizePath(ConfMan.get("themepath") + "/" + defaultFile, '/'));
|
FSNode *fs = new FSNode(normalizePath(ConfMan.get("themepath") + "/" + defaultFile, '/'));
|
||||||
if (fs->exists()) {
|
if (fs->exists()) {
|
||||||
dat = Common::makeZipArchive(*fs);
|
dat = makeZipArchive(*fs);
|
||||||
}
|
}
|
||||||
delete fs;
|
delete fs;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dat) {
|
if (!dat) {
|
||||||
Common::File *file = new Common::File;
|
File *file = new File;
|
||||||
if (ConfMan.hasKey(packsPath)) {
|
if (ConfMan.hasKey(packsPath)) {
|
||||||
Common::String path(normalizePath(ConfMan.get(packsPath) + "/" + defaultFile, '/'));
|
String path(normalizePath(ConfMan.get(packsPath) + "/" + defaultFile, '/'));
|
||||||
|
|
||||||
if (File::exists(path))
|
if (File::exists(path))
|
||||||
file->open(path);
|
file->open(path);
|
||||||
|
@ -81,7 +81,7 @@ bool generateZipSet(Common::SearchSet &searchSet, const char *defaultFile, const
|
||||||
file->open(defaultFile);
|
file->open(defaultFile);
|
||||||
|
|
||||||
if (file->isOpen())
|
if (file->isOpen())
|
||||||
dat = Common::makeZipArchive(defaultFile);
|
dat = makeZipArchive(defaultFile);
|
||||||
|
|
||||||
if (!dat) {
|
if (!dat) {
|
||||||
warning("generateZipSet: Could not find '%s'", defaultFile);
|
warning("generateZipSet: Could not find '%s'", defaultFile);
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace Common {
|
||||||
* @return True if the string has been parsed correctly, false if an error
|
* @return True if the string has been parsed correctly, false if an error
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
bool generateZipSet(Common::SearchSet &searchSet, const char *defaultFile, const char *packsMask, const char *packsPath = "iconspath");
|
bool generateZipSet(SearchSet &searchSet, const char *defaultFile, const char *packsMask, const char *packsPath = "iconspath");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue