Apply patch suggested in issue 161.

This commit is contained in:
castano 2011-04-06 06:41:57 +00:00
parent 474d2a37f8
commit 189b9338f9

View File

@ -92,13 +92,16 @@ namespace nvtt {
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:
int i;
};
struct TaskFunctor {
TaskFunctor(Task * task, void * context) : task(task), context(context) {}
void operator()(int & n) const {
void operator()(int n) const {
task(context, n);
}
Task * task;