ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/arch.C
(Generate patch)

Comparing deliantra/server/common/arch.C (file contents):
Revision 1.117 by root, Sun Nov 18 00:37:11 2018 UTC vs.
Revision 1.119 by root, Sat Dec 1 20:22:12 2018 UTC

32 32
33archetype *loading_arch; // ugly flag to object loader etc. to suppress/request special processing 33archetype *loading_arch; // ugly flag to object loader etc. to suppress/request special processing
34arch_ptr archetype::empty; 34arch_ptr archetype::empty;
35 35
36// the hashtable 36// the hashtable
37typedef ska::flat_hash_map< 37typedef ska::flat_hash_map
38 <
38 const char *, 39 const char *,
39 arch_ptr, 40 arch_ptr,
40 str_hash, 41 str_hash,
41 str_equal, 42 str_equal,
42 slice_allocator< std::pair<const char *const, arch_ptr> > 43 slice_allocator< std::pair<const char *const, arch_ptr> >
43> HT; 44 > HT;
44 45
45static HT ht (10000); 46static HT ht (10000);
46archvec archetypes; 47archvec archetypes;
47static unordered_vector<archetype *> allarch; 48static unordered_vector<archetype *> allarch;
48static int dirtycnt; 49static int dirtycnt;
346archetype::find (const char *name) 347archetype::find (const char *name)
347{ 348{
348 if (!name) 349 if (!name)
349 return 0; 350 return 0;
350 351
351 auto (i, ht.find (name)); 352 auto i = ht.find (name);
352 353
353 if (i == ht.end ()) 354 if (i == ht.end ())
354 return 0; 355 return 0;
355 else 356 else
356 return i->second; 357 return i->second;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines