From c23510785bd61bf4ab287e40d2caca060aa94724 Mon Sep 17 00:00:00 2001 From: yao Date: Thu, 4 Jul 2013 08:59:42 +0800 Subject: [PATCH] remove the redundant function --- modules/ocl/src/kmeans.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/modules/ocl/src/kmeans.cpp b/modules/ocl/src/kmeans.cpp index 3922fd8dc..e1a91caa5 100644 --- a/modules/ocl/src/kmeans.cpp +++ b/modules/ocl/src/kmeans.cpp @@ -57,39 +57,6 @@ namespace cv extern const char *kmeans_kernel; } } -////////////////////////////////////////////////////////////////////////// -//////////////////common///////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////// -void swap( Mat& a, Mat& b ) -{ - std::swap(a.flags, b.flags); - std::swap(a.dims, b.dims); - std::swap(a.rows, b.rows); - std::swap(a.cols, b.cols); - std::swap(a.data, b.data); - std::swap(a.refcount, b.refcount); - std::swap(a.datastart, b.datastart); - std::swap(a.dataend, b.dataend); - std::swap(a.datalimit, b.datalimit); - std::swap(a.allocator, b.allocator); - - std::swap(a.size.p, b.size.p); - std::swap(a.step.p, b.step.p); - std::swap(a.step.buf[0], b.step.buf[0]); - std::swap(a.step.buf[1], b.step.buf[1]); - - if( a.step.p == b.step.buf ) - { - a.step.p = a.step.buf; - a.size.p = &a.rows; - } - - if( b.step.p == a.step.buf ) - { - b.step.p = b.step.buf; - b.size.p = &b.rows; - } -} static void generateRandomCenter(const vector& box, float* center, RNG& rng) {