mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: remove extraneous field from dtDisjointSet
Just return the size of the vector.
This commit is contained in:
parent
1ac6f9be60
commit
8b8e193348
@ -123,17 +123,13 @@ public:
|
||||
rank.resize(size);
|
||||
parent.resize(size);
|
||||
|
||||
setCount = size;
|
||||
|
||||
for (int i = 0; i < parent.size(); i++)
|
||||
parent[i] = i;
|
||||
}
|
||||
int insertNew()
|
||||
{
|
||||
rank.push_back(0);
|
||||
parent.push_back(setCount);
|
||||
|
||||
return setCount++;
|
||||
return parent.emplace_back((int)parent.size());
|
||||
}
|
||||
inline int find(const int id) const
|
||||
{
|
||||
@ -161,13 +157,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
inline int getSetCount() const { return setCount; }
|
||||
inline int getSetCount() const { return (int)parent.size(); }
|
||||
|
||||
private:
|
||||
std::vector<int> rank;
|
||||
std::vector<int> parent;
|
||||
|
||||
int setCount = 0;
|
||||
};
|
||||
|
||||
bool dtBuildStaticPathingData(dtNavMesh* mesh);
|
||||
|
Loading…
x
Reference in New Issue
Block a user