1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

add noexcept to default constructors of cv::ocl

- follows iso c++ guideline C.44
- enables default compiler-created constructors to
  also be noexcept

original commit: 77e26a7db3

- handled KernelArg, Image2D
This commit is contained in:
Dale Phurrough
2021-02-20 14:16:47 +01:00
committed by Alexander Alekhin
parent 8f6ba5a089
commit 4badf640bf
3 changed files with 33 additions and 30 deletions
+10 -10
View File
@@ -70,7 +70,7 @@ class CV_EXPORTS Image2D;
class CV_EXPORTS_W_SIMPLE Device
{
public:
CV_WRAP Device();
CV_WRAP Device() CV_NOEXCEPT;
explicit Device(void* d);
Device(const Device& d);
Device& operator = (const Device& d);
@@ -238,7 +238,7 @@ protected:
class CV_EXPORTS Context
{
public:
Context();
Context() CV_NOEXCEPT;
explicit Context(int dtype);
~Context();
Context(const Context& c);
@@ -269,7 +269,7 @@ public:
class CV_EXPORTS Platform
{
public:
Platform();
Platform() CV_NOEXCEPT;
~Platform();
Platform(const Platform& p);
Platform& operator = (const Platform& p);
@@ -324,7 +324,7 @@ void initializeContextFromHandle(Context& ctx, void* platform, void* context, vo
class CV_EXPORTS Queue
{
public:
Queue();
Queue() CV_NOEXCEPT;
explicit Queue(const Context& c, const Device& d=Device());
~Queue();
Queue(const Queue& q);
@@ -350,7 +350,7 @@ class CV_EXPORTS KernelArg
public:
enum { LOCAL=1, READ_ONLY=2, WRITE_ONLY=4, READ_WRITE=6, CONSTANT=8, PTR_ONLY = 16, NO_SIZE=256 };
KernelArg(int _flags, UMat* _m, int wscale=1, int iwscale=1, const void* _obj=0, size_t _sz=0);
KernelArg();
KernelArg() CV_NOEXCEPT;
static KernelArg Local(size_t localMemSize)
{ return KernelArg(LOCAL, 0, 1, 1, 0, localMemSize); }
@@ -387,7 +387,7 @@ public:
class CV_EXPORTS Kernel
{
public:
Kernel();
Kernel() CV_NOEXCEPT;
Kernel(const char* kname, const Program& prog);
Kernel(const char* kname, const ProgramSource& prog,
const String& buildopts = String(), String* errmsg=0);
@@ -597,7 +597,7 @@ protected:
class CV_EXPORTS Program
{
public:
Program();
Program() CV_NOEXCEPT;
Program(const ProgramSource& src,
const String& buildflags, String& errmsg);
Program(const Program& prog);
@@ -642,7 +642,7 @@ class CV_EXPORTS ProgramSource
public:
typedef uint64 hash_t; // deprecated
ProgramSource();
ProgramSource() CV_NOEXCEPT;
explicit ProgramSource(const String& module, const String& name, const String& codeStr, const String& codeHash);
explicit ProgramSource(const String& prog); // deprecated
explicit ProgramSource(const char* prog); // deprecated
@@ -711,7 +711,7 @@ protected:
class CV_EXPORTS PlatformInfo
{
public:
PlatformInfo();
PlatformInfo() CV_NOEXCEPT;
explicit PlatformInfo(void* id);
~PlatformInfo();
@@ -776,7 +776,7 @@ CV_EXPORTS void buildOptionsAddMatrixDescription(String& buildOptions, const Str
class CV_EXPORTS Image2D
{
public:
Image2D();
Image2D() CV_NOEXCEPT;
/**
@param src UMat object from which to get image properties and data