Feature Requests
Feature Requests
Hey where should I post feature requests (if anywhere)? Should I use the feature request location in the bug tracker, or is that ignored? I'd like to request that the core::list::Iterator object have an operator+ and operator- set up so I can move through the iterator at intervals other than 1. The code should be simple, just a for loop, however I'd like to avoid modifying the engine myself as then I will have to continue to redo my changes each time the engine is updated.
Re: Feature Requests
The best place to do a feature request is here. Just like you did.
And a very easy way to avoid this is to implement it yourself and sent the code to me. If the code is useful and clean (as I think it will be, for the additional operator in the iterator), I'll add it in the next version of the engine, AND if you like, you'll get on the contributors list, if it was a lot of code, or it was complicated, or whateverBoogle wrote:The code should be simple, just a for loop, however I'd like to avoid modifying the engine myself as then I will have to continue to redo my changes each time the engine is updated.
Cool.. here is the code. Mostly it was just copied from the STL implementation and modified to work with the Irrlicht iterator.
Code: Select all
Iterator operator+(s32 num) const
{
Iterator tmp = *this;
if (num >= 0)
while (num-- && tmp.current != 0) ++tmp;
else
while (num++ && tmp.current != 0) --tmp;
return tmp;
}
Iterator& operator+=(s32 num)
{
if (num >= 0)
while (num-- && this->current != 0) ++(*this);
else
while (num++ && this->current != 0) --(*this);
return *this;
}
Iterator operator-(s32 num) const { return (*this)+(-num); }
Iterator operator-=(s32 num) const { (*this)+=(-num); return *this; }