MCPcopy Create free account
hub / github.com/PolygonTek/BlueshiftEngine / AddUnique

Method AddUnique

Source/Runtime/Private/IO/FileSystem.cpp:62–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60//--------------------------------------------------------------------------------------------------
61
62int 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//

Callers 6

ListFilesMethod · 0.45
ChangeMeshMethod · 0.45
QuerySelectionMethod · 0.45
CreateMethod · 0.45
GetOverlapsMethod · 0.45

Calls 6

GenerateHashMethod · 0.45
FirstMethod · 0.45
NextMethod · 0.45
IcmpMethod · 0.45
AppendMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected