mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
Merge pull request #635 from taka-no-me:c++11
This commit is contained in:
commit
d1a148b06f
@ -85,10 +85,10 @@ namespace
|
||||
};
|
||||
size_t colors_mum = sizeof(colors)/sizeof(colors[0]);
|
||||
|
||||
#if (defined __cplusplus && __cplusplus > 199711L) || defined _STLPORT_MAJOR
|
||||
#else
|
||||
template<class FwIt, class T> void iota(FwIt first, FwIt last, T value) { while(first != last) *first++ = value++; }
|
||||
#endif
|
||||
template<class FwIt, class T> inline void _iota(FwIt first, FwIt last, T value)
|
||||
{
|
||||
while(first != last) *first++ = value++;
|
||||
}
|
||||
|
||||
void computeNormals( const Octree& Octree, const vector<Point3f>& centers, vector<Point3f>& normals,
|
||||
vector<uchar>& mask, float normalRadius, int minNeighbors = 20)
|
||||
@ -799,14 +799,14 @@ void cv::SpinImageModel::selectRandomSubset(float ratio)
|
||||
else if (setSize == vtxSize)
|
||||
{
|
||||
subset.resize(vtxSize);
|
||||
iota(subset.begin(), subset.end(), 0);
|
||||
_iota(subset.begin(), subset.end(), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
RNG& rnd = theRNG();
|
||||
|
||||
vector<size_t> left(vtxSize);
|
||||
iota(left.begin(), left.end(), (size_t)0);
|
||||
_iota(left.begin(), left.end(), (size_t)0);
|
||||
|
||||
subset.resize(setSize);
|
||||
for(size_t i = 0; i < setSize; ++i)
|
||||
@ -879,7 +879,7 @@ void cv::SpinImageModel::compute()
|
||||
{
|
||||
mesh.computeNormals(normalRadius, minNeighbors);
|
||||
subset.resize(mesh.vtx.size());
|
||||
iota(subset.begin(), subset.end(), 0);
|
||||
_iota(subset.begin(), subset.end(), 0);
|
||||
}
|
||||
else
|
||||
mesh.computeNormals(subset, normalRadius, minNeighbors);
|
||||
|
Loading…
Reference in New Issue
Block a user