| 60 | //-------------------------------------------------------------------------------------------------- |
| 61 | |
| 62 | int FileArray::AddUnique(const FileInfo &file, HashIndex &hashIndex) { |
| 63 | int hashKey = hashIndex.GenerateHash(file.filename); |
| 64 | int i = hashIndex.First(hashKey); |
| 65 | |
| 66 | for (; i != -1; i = hashIndex.Next(i)) { |
| 67 | if (!array[i].filename.Icmp(file.filename)) { |
| 68 | return i; |
| 69 | } |
| 70 | } |
| 71 | i = array.Append(file); |
| 72 | hashIndex.Add(hashKey, i); |
| 73 | return i; |
| 74 | } |
| 75 | |
| 76 | //-------------------------------------------------------------------------------------------------- |
| 77 | // |
no test coverage detected