mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 00:49:28 -05:00
used tr1::unordered_set instead of std::set to store pointer checking list, as it is more efficients for lookups
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4158 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
099cc6c11c
commit
c0f94a41db
@ -31,6 +31,7 @@
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <tr1/unordered_set>
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
#include <sys/stat.h>
|
||||
@ -50,7 +51,7 @@ static const char FILE_CACHE_SEPARATOR_CHAR = '|' ;
|
||||
****/
|
||||
|
||||
static RsMutex FIndexPtrMtx ;
|
||||
std::set<void*> FileIndex::_pointers ;
|
||||
std::tr1::unordered_set<void*> FileIndex::_pointers ;
|
||||
|
||||
void FileIndex::registerEntry(void*p)
|
||||
{
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <tr1/unordered_set>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <stdint.h>
|
||||
@ -245,7 +246,7 @@ class FileIndex
|
||||
|
||||
PersonEntry *root;
|
||||
|
||||
static std::set<void*> _pointers ;
|
||||
static std::tr1::unordered_set<void*> _pointers ;
|
||||
static void registerEntry(void*p) ;
|
||||
static void unregisterEntry(void*p) ;
|
||||
static bool isValid(void*p) ;
|
||||
|
Loading…
Reference in New Issue
Block a user