remove AddFileSet

This commit is contained in:
Glenn Maynard
2004-09-05 04:12:42 +00:00
parent 63f24129cf
commit ed9e25b2b1
2 changed files with 6 additions and 12 deletions
+6 -11
View File
@@ -260,23 +260,18 @@ FileSet *FilenameDB::GetFileSet( CString dir, bool create )
else else
{ {
ret = new FileSet; ret = new FileSet;
AddFileSet( dir, ret );
map<CString, FileSet *>::iterator it = dirs.find( lower );
if( it != dirs.end() )
delete it->second;
dirs[lower] = ret;
} }
PopulateFileSet( *ret, dir ); PopulateFileSet( *ret, dir );
return ret; return ret;
} }
void FilenameDB::AddFileSet( CString sPath, FileSet *fs )
{
sPath.MakeLower();
map<CString, FileSet *>::iterator it = dirs.find( sPath );
if( it != dirs.end() )
delete it->second;
dirs[sPath] = fs;
}
/* Add the file or directory "sPath". sPath is a directory if it ends with /* Add the file or directory "sPath". sPath is a directory if it ends with
* a slash. */ * a slash. */
void FilenameDB::AddFile( const CString &sPath, int size, int hash, void *priv ) void FilenameDB::AddFile( const CString &sPath, int size, int hash, void *priv )
-1
View File
@@ -80,7 +80,6 @@ protected:
void GetFilesMatching(const CString &dir, void GetFilesMatching(const CString &dir,
const CString &beginning, const CString &containing, const CString &ending, const CString &beginning, const CString &containing, const CString &ending,
vector<CString> &out, bool bOnlyDirs); vector<CString> &out, bool bOnlyDirs);
void AddFileSet( CString sPath, FileSet *fs );
void DelFileSet( map<CString, FileSet *>::iterator dir ); void DelFileSet( map<CString, FileSet *>::iterator dir );
/* The given path wasn't cached. Cache it. */ /* The given path wasn't cached. Cache it. */