diff --git a/samples/gpu/performance/performance.cpp b/samples/gpu/performance/performance.cpp index 01623ff049..b9bbc85c11 100644 --- a/samples/gpu/performance/performance.cpp +++ b/samples/gpu/performance/performance.cpp @@ -6,19 +6,6 @@ using namespace std; using namespace cv; - -void TestSystem::setWorkingDir(const string& val) -{ - working_dir_ = val; -} - - -void TestSystem::setTestFilter(const string& val) -{ - test_filter_ = val; -} - - void TestSystem::run() { // Run test initializers diff --git a/samples/gpu/performance/performance.h b/samples/gpu/performance/performance.h index 31931e7776..2a39664b10 100644 --- a/samples/gpu/performance/performance.h +++ b/samples/gpu/performance/performance.h @@ -12,8 +12,11 @@ class Runnable { public: - explicit Runnable(const std::string& name): name_(name) {} - const std::string& name() const { return name_; } + explicit Runnable(const std::string& name): name_(name) {} + virtual ~Runnable() {} + + const std::string& name() const { return name_; } + virtual void run() = 0; private: @@ -30,10 +33,10 @@ public: return me; } - void setWorkingDir(const std::string& val); + void setWorkingDir(const std::string& val) { working_dir_ = val; } const std::string& workingDir() const { return working_dir_; } - void setTestFilter(const std::string& val); + void setTestFilter(const std::string& val) { test_filter_ = val; } const std::string& testFilter() const { return test_filter_; } void addInit(Runnable* init) { inits_.push_back(init); }