From 9086efa8e92732595a3d0a1fa73eeaf461d915a4 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Tue, 2 Apr 2013 13:24:00 +0400 Subject: [PATCH] fixed warnings --- modules/nonfree/src/surf_gpu.cpp | 3 +++ modules/nonfree/test/test_precomp.hpp | 8 +++++--- modules/nonfree/test/test_surf.ocl.cpp | 11 ----------- samples/gpu/super_resolution.cpp | 2 -- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/modules/nonfree/src/surf_gpu.cpp b/modules/nonfree/src/surf_gpu.cpp index eabbd78..bfc7e70 100644 --- a/modules/nonfree/src/surf_gpu.cpp +++ b/modules/nonfree/src/surf_gpu.cpp @@ -223,6 +223,9 @@ namespace } private: + SURF_GPU_Invoker(const SURF_GPU_Invoker&); + SURF_GPU_Invoker& operator =(const SURF_GPU_Invoker&); + SURF_GPU& surf_; int img_cols, img_rows; diff --git a/modules/nonfree/test/test_precomp.hpp b/modules/nonfree/test/test_precomp.hpp index 15f2b95..5be95a3 100644 --- a/modules/nonfree/test/test_precomp.hpp +++ b/modules/nonfree/test/test_precomp.hpp @@ -14,14 +14,16 @@ #include "opencv2/highgui/highgui.hpp" #include "opencv2/nonfree/nonfree.hpp" +#include "opencv2/ts/gpu_test.hpp" + #include "opencv2/opencv_modules.hpp" + #ifdef HAVE_OPENCV_OCL # include "opencv2/nonfree/ocl.hpp" #endif -#if defined(HAVE_OPENCV_GPU) && defined(HAVE_CUDA) - #include "opencv2/ts/gpu_test.hpp" - #include "opencv2/nonfree/gpu.hpp" +#ifdef HAVE_OPENCV_GPU +# include "opencv2/nonfree/gpu.hpp" #endif #endif diff --git a/modules/nonfree/test/test_surf.ocl.cpp b/modules/nonfree/test/test_surf.ocl.cpp index 76ed37d..d6a877b 100644 --- a/modules/nonfree/test/test_surf.ocl.cpp +++ b/modules/nonfree/test/test_surf.ocl.cpp @@ -109,17 +109,6 @@ static int getMatchedPointsCount(const std::vector& keypoints1, co return validCount; } -#define PARAM_TEST_CASE(name, ...) struct name : testing::TestWithParam< std::tr1::tuple< __VA_ARGS__ > > -#define IMPLEMENT_PARAM_CLASS(name, type) \ - namespace { class name { \ - public: \ - name ( type arg = type ()) : val_(arg) {} \ - operator type () const {return val_;} \ - private: \ - type val_; \ - }; \ - inline void PrintTo( name param, std::ostream* os) {*os << #name << "=" << testing::PrintToString(static_cast< type >(param));}} - IMPLEMENT_PARAM_CLASS(HessianThreshold, double) IMPLEMENT_PARAM_CLASS(Octaves, int) IMPLEMENT_PARAM_CLASS(OctaveLayers, int) diff --git a/samples/gpu/super_resolution.cpp b/samples/gpu/super_resolution.cpp index 2dd3656..80aa480 100644 --- a/samples/gpu/super_resolution.cpp +++ b/samples/gpu/super_resolution.cpp @@ -48,8 +48,6 @@ static Ptr createOptFlow(const string& name, bool useGpu) cerr << "Incorrect Optical Flow algorithm - " << name << endl; exit(-1); } - - return Ptr(); } int main(int argc, const char* argv[]) -- 2.7.4