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.17 by root, Tue Sep 12 19:20:06 2006 UTC vs.
Revision 1.19 by root, Thu Sep 14 18:13:01 2006 UTC

48 * MSW 2003-04-29 48 * MSW 2003-04-29
49 */ 49 */
50 50
51#if USE_UNORDERED_MAP 51#if USE_UNORDERED_MAP
52// the hashtable 52// the hashtable
53typedef
54 std::tr1::unordered_map < 53typedef std::tr1::unordered_map
55size_t, archetype *> 54 <
55 std::size_t,
56 archetype *,
57 std::hash<size_t>,
58 std::equal_to<size_t>,
59 slice_allocator< std::pair<const std::size_t, archetype *> >
60 true,
56 HT; 61 > HT;
57 62
58static 63static HT ht;
59 HT
60 ht;
61#endif 64#endif
62 65
63/** 66/**
64 * GROS - This function retrieves an archetype given the name that appears 67 * GROS - This function retrieves an archetype given the name that appears
65 * during the game (for example, "writing pen" instead of "stylus"). 68 * during the game (for example, "writing pen" instead of "stylus").
752 name = shstr::find (name); 755 name = shstr::find (name);
753 756
754 if (!name) 757 if (!name)
755 return 0; 758 return 0;
756 759
757 HT::const_iterator i = ht.find ((size_t) name); 760 AUTODECL (i, ht.find ((size_t) name));
758 761
759 if (i == ht.end ()) 762 if (i == ht.end ())
760 return 0; 763 return 0;
761 else 764 else
762 return i->second; 765 return i->second;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines