Code quality: Added possibility to pinpoint MSVC warnings C4251, C4275
This commit is contained in:
@@ -11,4 +11,17 @@
|
||||
#define ISAACAPI __attribute__((visibility("default")))
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(_MSC_VER)
|
||||
#define DISABLE_MSVC_WARNING_C4251 __pragma(warning(disable: 4251))
|
||||
#define RESTORE_MSVC_WARNING_C4251 __pragma(warning(default: 4251))
|
||||
#define DISABLE_MSVC_WARNING_C4275 __pragma(warning(disable: 4275))
|
||||
#define RESTORE_MSVC_WARNING_C4275 __pragma(warning(disable: 4275))
|
||||
|
||||
#else
|
||||
#define DISABLE_MSVC_WARNING_C4251
|
||||
#define RESTORE_MSVC_WARNING_C4251
|
||||
#define DISABLE_MSVC_WARNING_C4275
|
||||
#define RESTORE_MSVC_WARNING_C4275
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -12,6 +12,8 @@
|
||||
#endif
|
||||
#include "isaac/defines.h"
|
||||
|
||||
DISABLE_MSVC_WARNING_C4275
|
||||
|
||||
namespace isaac
|
||||
{
|
||||
namespace driver
|
||||
@@ -204,4 +206,6 @@ ISAACAPI void check(cl_int err);
|
||||
}
|
||||
}
|
||||
|
||||
RESTORE_MSVC_WARNING_C4275
|
||||
|
||||
#endif
|
||||
|
@@ -53,8 +53,10 @@ public:
|
||||
~Handle();
|
||||
|
||||
private:
|
||||
DISABLE_MSVC_WARNING_C4251
|
||||
std::shared_ptr<CLType> cl_;
|
||||
std::shared_ptr<CUType> cu_;
|
||||
RESTORE_MSVC_WARNING_C4251
|
||||
private:
|
||||
backend_type backend_;
|
||||
bool has_ownership_;
|
||||
|
Reference in New Issue
Block a user