Apply patch suggested in issue 161.
This commit is contained in:
parent
8a837981b6
commit
76a7adf83e
@ -92,13 +92,16 @@ namespace nvtt {
|
|||||||
CountingIterator & operator++() { i++; return *this; }
|
CountingIterator & operator++() { i++; return *this; }
|
||||||
CountingIterator & operator--() { i--; return *this; }
|
CountingIterator & operator--() { i--; return *this; }
|
||||||
|
|
||||||
|
bool operator==(const CountingIterator& o) const { return i == o.i; }
|
||||||
|
bool operator!=(const CountingIterator& o) const { return i != o.i; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int i;
|
int i;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TaskFunctor {
|
struct TaskFunctor {
|
||||||
TaskFunctor(Task * task, void * context) : task(task), context(context) {}
|
TaskFunctor(Task * task, void * context) : task(task), context(context) {}
|
||||||
void operator()(int & n) const {
|
void operator()(int n) const {
|
||||||
task(context, n);
|
task(context, n);
|
||||||
}
|
}
|
||||||
Task * task;
|
Task * task;
|
||||||
|
Loading…
Reference in New Issue
Block a user