QtConcurrent: remove a using declaration in a header file
See Sutter/Alexandrescu, Item 59, for rationale. Change-Id: Ie689e2a00f9ed0fce1ccfdb77c943dd1b1beb4dc Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
c012ee2940
commit
0206c1e4e7
@ -120,11 +120,11 @@ public:
|
||||
|
||||
|
||||
typename Sequence::const_iterator it = sequenceBeginIterator;
|
||||
advance(it, begin);
|
||||
std::advance(it, begin);
|
||||
for (int i = begin; i < end; ++i) {
|
||||
if (keep(*it))
|
||||
results.vector.append(*it);
|
||||
advance(it, 1);
|
||||
std::advance(it, 1);
|
||||
}
|
||||
|
||||
reducer.runReduce(reduce, reducedResult, results);
|
||||
@ -206,11 +206,11 @@ public:
|
||||
results.vector.reserve(end - begin);
|
||||
|
||||
Iterator it = sequenceBeginIterator;
|
||||
advance(it, begin);
|
||||
std::advance(it, begin);
|
||||
for (int i = begin; i < end; ++i) {
|
||||
if (keep(*it))
|
||||
results.vector.append(*it);
|
||||
advance(it, 1);
|
||||
std::advance(it, 1);
|
||||
}
|
||||
|
||||
reducer.runReduce(reduce, reducedResult, results);
|
||||
@ -282,11 +282,11 @@ public:
|
||||
results.vector.reserve(count);
|
||||
|
||||
Iterator it = sequenceBeginIterator;
|
||||
advance(it, begin);
|
||||
std::advance(it, begin);
|
||||
for (int i = begin; i < end; ++i) {
|
||||
if (keep(*it))
|
||||
results.vector.append(*it);
|
||||
advance(it, 1);
|
||||
std::advance(it, 1);
|
||||
}
|
||||
|
||||
this->reportResults(results.vector, begin, count);
|
||||
|
@ -59,8 +59,6 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtConcurrent {
|
||||
|
||||
using std::advance;
|
||||
|
||||
/*
|
||||
The BlockSizeManager class manages how many iterations a thread should
|
||||
reserve and process at a time. This is done by measuring the time spent
|
||||
|
@ -75,10 +75,10 @@ public:
|
||||
bool runIterations(Iterator sequenceBeginIterator, int beginIndex, int endIndex, void *)
|
||||
{
|
||||
Iterator it = sequenceBeginIterator;
|
||||
advance(it, beginIndex);
|
||||
std::advance(it, beginIndex);
|
||||
for (int i = beginIndex; i < endIndex; ++i) {
|
||||
runIteration(it, i, 0);
|
||||
advance(it, 1);
|
||||
std::advance(it, 1);
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -129,10 +129,10 @@ public:
|
||||
results.vector.reserve(end - begin);
|
||||
|
||||
Iterator it = sequenceBeginIterator;
|
||||
advance(it, begin);
|
||||
std::advance(it, begin);
|
||||
for (int i = begin; i < end; ++i) {
|
||||
results.vector.append(map(*(it)));
|
||||
advance(it, 1);
|
||||
std::advance(it, 1);
|
||||
}
|
||||
|
||||
reducer.runReduce(reduce, reducedResult, results);
|
||||
@ -183,10 +183,10 @@ public:
|
||||
{
|
||||
|
||||
Iterator it = sequenceBeginIterator;
|
||||
advance(it, begin);
|
||||
std::advance(it, begin);
|
||||
for (int i = begin; i < end; ++i) {
|
||||
runIteration(it, i, results + (i - begin));
|
||||
advance(it, 1);
|
||||
std::advance(it, 1);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user