proton icon indicating copy to clipboard operation
proton copied to clipboard

FocusInputComponent: It's possible to go through a std::list backwards

Open iProgramMC opened this issue 3 years ago • 0 comments

https://github.com/SethRobinson/proton/blob/master/shared/Entity/Entity.cpp#L188-L210

It's actually possible, by using std::list::rbegin (points to the end of the list), and std::list::rend (points to the element before the first list element, works the same as std::list::begin and std::list::end)

std::<container type here>::reverse_iterator is very helpful in this case. With a little hacking I'm pretty sure it's possible.

NOTE: I tried just copying the contents of CallFunctionRecursively, it didn't work but I will try with something else

iProgramMC avatar Nov 03 '21 11:11 iProgramMC