From f262e71eb4a53ec7032b86df872f0899076ee69d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Jan 2023 14:09:32 +0100 Subject: [PATCH] JANITORIAL: Remove redundant namespace specs --- common/zip-set.cpp | 26 +++++++++++++------------- common/zip-set.h | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/common/zip-set.cpp b/common/zip-set.cpp index 94edc46088f..e76b9888530 100644 --- a/common/zip-set.cpp +++ b/common/zip-set.cpp @@ -28,24 +28,24 @@ namespace Common { 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(); } }; -bool generateZipSet(Common::SearchSet &searchSet, const char *defaultFile, const char *packsMask, const char *packsPath) { - Common::Archive *dat; +bool generateZipSet(SearchSet &searchSet, const char *defaultFile, const char *packsMask, const char *packsPath) { + Archive *dat; bool changed = false; if (!ConfMan.get(packsPath).empty()) { - Common::FSDirectory *iconDir = new Common::FSDirectory(ConfMan.get(packsPath)); - Common::ArchiveMemberList iconFiles; + FSDirectory *iconDir = new FSDirectory(ConfMan.get(packsPath)); + ArchiveMemberList iconFiles; 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) { - dat = Common::makeZipArchive((*ic)->createReadStream()); + for (ArchiveMemberList::iterator ic = iconFiles.begin(); ic != iconFiles.end(); ++ic) { + dat = makeZipArchive((*ic)->createReadStream()); if (dat) { searchSet.add((*ic)->getName(), dat); @@ -60,17 +60,17 @@ bool generateZipSet(Common::SearchSet &searchSet, const char *defaultFile, const dat = nullptr; 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()) { - dat = Common::makeZipArchive(*fs); + dat = makeZipArchive(*fs); } delete fs; } if (!dat) { - Common::File *file = new Common::File; + File *file = new File; if (ConfMan.hasKey(packsPath)) { - Common::String path(normalizePath(ConfMan.get(packsPath) + "/" + defaultFile, '/')); + String path(normalizePath(ConfMan.get(packsPath) + "/" + defaultFile, '/')); if (File::exists(path)) file->open(path); @@ -81,7 +81,7 @@ bool generateZipSet(Common::SearchSet &searchSet, const char *defaultFile, const file->open(defaultFile); if (file->isOpen()) - dat = Common::makeZipArchive(defaultFile); + dat = makeZipArchive(defaultFile); if (!dat) { warning("generateZipSet: Could not find '%s'", defaultFile); diff --git a/common/zip-set.h b/common/zip-set.h index 331da4c3189..4bba36d99e0 100644 --- a/common/zip-set.h +++ b/common/zip-set.h @@ -47,7 +47,7 @@ namespace Common { * @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"); }