Change the Intersection to a class, and stop using memory allocation for it (and pointer)
A bit more clean (on the code side)
This commit is contained in:
@@ -15,14 +15,14 @@
|
||||
class Intersect
|
||||
{
|
||||
private:
|
||||
Intersection **list;
|
||||
Intersection *list;
|
||||
uint32_t num;
|
||||
uint32_t allocated;
|
||||
public:
|
||||
Intersect();
|
||||
void add(Intersection *i);
|
||||
void add(Intersection i);
|
||||
int count() { return this->num; };
|
||||
Intersection *operator[](const int p) { return this->list[p]; }
|
||||
Intersection operator[](const int p) { return this->list[p]; }
|
||||
};
|
||||
|
||||
#endif //DORAYME_INTERSECT_H
|
||||
|
||||
Reference in New Issue
Block a user