| 47 | } |
| 48 | |
| 49 | SimFieldDictionary::Entry *SimFieldDictionary::addEntry(U32 bucket, StringTableEntry slotName, ConsoleBaseType* type, char* value) |
| 50 | { |
| 51 | Entry* ret; |
| 52 | if (smFreeList) |
| 53 | { |
| 54 | ret = smFreeList; |
| 55 | smFreeList = ret->next; |
| 56 | } |
| 57 | else |
| 58 | ret = fieldChunker.alloc(); |
| 59 | |
| 60 | ret->next = mHashTable[bucket]; |
| 61 | ret->slotName = slotName; |
| 62 | ret->type = type; |
| 63 | ret->value = value; |
| 64 | |
| 65 | mHashTable[bucket] = ret; |
| 66 | mNumFields++; |
| 67 | mVersion++; |
| 68 | |
| 69 | return ret; |
| 70 | } |
| 71 | |
| 72 | void SimFieldDictionary::freeEntry(SimFieldDictionary::Entry *ent) |
| 73 | { |