You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something to do. This doesn't require too much knowledge of how everything works. Depends on #281, this issue is mostly copied from it.
IdRegistryStl now has iterators. Iterating all possible IDs previously looks something like this:
for (std::size_tconst drawEntInt : rScene.m_scnRdr.m_drawIds.bitview().zeros())
{
autoconst drawEnt = DrawEnt(drawEntInt);
// do something with drawEnt
}
This works because IdRegistryStl is internally just a bit view / bitvector; ones bits are used for free IDs, and zeros bits are used for existing ones. There are countless instances of this in the code (search for "bitview().zeros()"), which can now be replaced with:
for (DrawEnt const drawEnt : rScene.m_scnRdr.m_drawIds)
{
// do something with drawEnt
}
Task:
Search the entire codebase for ".bitview().zeros()". Then refactor like above.
The text was updated successfully, but these errors were encountered:
Something to do. This doesn't require too much knowledge of how everything works. Depends on #281, this issue is mostly copied from it.
IdRegistryStl now has iterators. Iterating all possible IDs previously looks something like this:
This works because IdRegistryStl is internally just a bit view / bitvector; ones bits are used for free IDs, and zeros bits are used for existing ones. There are countless instances of this in the code (search for "bitview().zeros()"), which can now be replaced with:
Task:
Search the entire codebase for ".bitview().zeros()". Then refactor like above.
The text was updated successfully, but these errors were encountered: