diff options
| author | NeoBrainX <NeoBrainX@googlemail.com> | 2010-04-08 16:59:35 +0000 |
|---|---|---|
| committer | NeoBrainX <NeoBrainX@googlemail.com> | 2010-04-08 16:59:35 +0000 |
| commit | f727139ebfc28c82455fc050cea953cb7d204b5f (patch) | |
| tree | 1d3d29467a7a96e67ac9896607fe71a90fd3510d /Source/Core/Common/Src/FileSearch.cpp | |
| parent | b452bf7051112d9bb603aa9c3a228b06fdb4b2e1 (diff) | |
Random fixes and cleanups
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5297 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/FileSearch.cpp')
| -rw-r--r-- | Source/Core/Common/Src/FileSearch.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Source/Core/Common/Src/FileSearch.cpp b/Source/Core/Common/Src/FileSearch.cpp index 94ae687821..36eb3d0536 100644 --- a/Source/Core/Common/Src/FileSearch.cpp +++ b/Source/Core/Common/Src/FileSearch.cpp @@ -74,17 +74,13 @@ void CFileSearch::FindFiles(const std::string& _searchString, const std::string& size_t dot_pos = _searchString.rfind("."); if (dot_pos == std::string::npos) - { return; - } std::string ext = _searchString.substr(dot_pos); DIR* dir = opendir(_strPath.c_str()); if (!dir) - { return; - } dirent* dp; @@ -93,19 +89,17 @@ void CFileSearch::FindFiles(const std::string& _searchString, const std::string& dp = readdir(dir); if (!dp) - { break; - } std::string s(dp->d_name); if ( (s.size() > ext.size()) && (!strcasecmp(s.substr(s.size() - ext.size()).c_str(), ext.c_str())) ) { - std::string full_name; - if (_strPath.c_str()[_strPath.size()-1] == DIR_SEP_CHR) - full_name = _strPath + s; - else - full_name = _strPath + DIR_SEP + s; + std::string full_name; + if (_strPath.c_str()[_strPath.size()-1] == DIR_SEP_CHR) + full_name = _strPath + s; + else + full_name = _strPath + DIR_SEP + s; m_FileNames.push_back(full_name); } @@ -118,5 +112,5 @@ void CFileSearch::FindFiles(const std::string& _searchString, const std::string& const CFileSearch::XStringVector& CFileSearch::GetFileNames() const { - return(m_FileNames); + return m_FileNames; } |
