[DiscordArchive] stupid question, how on earth do I get the number of elements in a const_iterator?
[DiscordArchive] stupid question, how on earth do I get the number of elements in a const_iterator?
Archived author: stoneharry • Posted: 2024-06-24T17:22:39.060000+00:00
Original source
stupid question, how on earth do I get the number of elements in a const_iterator?
Archived author: Tea • Posted: 2024-06-24T17:25:48.908000+00:00
Original source
you dont
Archived author: stoneharry • Posted: 2024-06-24T17:26:12.724000+00:00
Original source
how do I bounds check it then? Would need to find out higher up the call hierarchy and pass it down?
Archived author: Tea • Posted: 2024-06-24T17:26:29.177000+00:00
Original source
change the argument from `vector::const_iterator` to `vector const&`
Archived author: jackpoz • Posted: 2024-06-24T17:30:55.773000+00:00
Original source
to that question, you can check also WorldModel.cpp:401
Archived author: jackpoz • Posted: 2024-06-24T17:31:06.756000+00:00
Original source
hit = IntersectTriangle(triangles[entry], vertices, ray, distance) || hit;
Archived author: jackpoz • Posted: 2024-06-24T17:31:39.480000+00:00
Original source
std::vector<MeshTriangle> const& tris
Archived author: jackpoz • Posted: 2024-06-24T17:32:12.315000+00:00
Original source
when dealing with crashes, you want to expand your knowledge around the area of the crash in small iterations
Archived author: stoneharry • Posted: 2024-06-24T17:42:45.460000+00:00
Original source
Well as I understand it, the const_iterator makes it read only. So not sure how badly I'm going to fuck it up by passing the parent object, but let's see. Not that familiar with C++, so could be about to cause all sorts of threading issues
Archived author: stoneharry • Posted: 2024-06-24T17:43:36.649000+00:00
Original source
but then again, I could just read the size when it's passed in and store that