Hash values are unsigned (gets rid of negative numbers in cache.index).
This commit is contained in:
@@ -39,16 +39,16 @@ void SongCacheIndex::ReadCacheIndex()
|
|||||||
CacheIndex.Reset();
|
CacheIndex.Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongCacheIndex::AddCacheIndex(const CString &path, int hash)
|
void SongCacheIndex::AddCacheIndex(const CString &path, unsigned hash)
|
||||||
{
|
{
|
||||||
CacheIndex.SetValueI( "Cache", "CacheVersion", FILE_CACHE_VERSION );
|
CacheIndex.SetValueI( "Cache", "CacheVersion", FILE_CACHE_VERSION );
|
||||||
CacheIndex.SetValueI( "Cache", path, hash );
|
CacheIndex.SetValueU( "Cache", path, hash );
|
||||||
CacheIndex.WriteFile();
|
CacheIndex.WriteFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
int SongCacheIndex::GetCacheHash( const CString &path )
|
unsigned SongCacheIndex::GetCacheHash( const CString &path ) const
|
||||||
{
|
{
|
||||||
int iDirHash;
|
unsigned iDirHash;
|
||||||
CacheIndex.GetValueI( "Cache", path, iDirHash );
|
CacheIndex.GetValueU( "Cache", path, iDirHash );
|
||||||
return iDirHash;
|
return iDirHash;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ public:
|
|||||||
~SongCacheIndex();
|
~SongCacheIndex();
|
||||||
|
|
||||||
void ReadCacheIndex();
|
void ReadCacheIndex();
|
||||||
void AddCacheIndex( const CString &path, int hash );
|
void AddCacheIndex( const CString &path, unsigned hash );
|
||||||
int GetCacheHash( const CString &path );
|
unsigned GetCacheHash( const CString &path ) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern SongCacheIndex *SONGINDEX; // global and accessable from anywhere in our program
|
extern SongCacheIndex *SONGINDEX; // global and accessable from anywhere in our program
|
||||||
|
|||||||
Reference in New Issue
Block a user