remove AddFileSet
This commit is contained in:
@@ -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 )
|
||||||
|
|||||||
@@ -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. */
|
||||||
|
|||||||
Reference in New Issue
Block a user