mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
core: apply CV_OVERRIDE/CV_FINAL
This commit is contained in:
@@ -124,7 +124,7 @@ public:
|
||||
/*!
|
||||
\return the error description and the context as a text string.
|
||||
*/
|
||||
virtual const char *what() const throw();
|
||||
virtual const char *what() const throw() CV_OVERRIDE;
|
||||
void formatMessage();
|
||||
|
||||
String msg; ///< the formatted error message
|
||||
|
||||
@@ -165,6 +165,8 @@ template <typename T>
|
||||
T* allocSingleton(size_t count) { return static_cast<T*>(fastMalloc(sizeof(T) * count)); }
|
||||
}
|
||||
|
||||
#if 1 // TODO: Remove in OpenCV 4.x
|
||||
|
||||
// property implementation macros
|
||||
|
||||
#define CV_IMPL_PROPERTY_RO(type, name, member) \
|
||||
@@ -187,6 +189,8 @@ T* allocSingleton(size_t count) { return static_cast<T*>(fastMalloc(sizeof(T) *
|
||||
#define CV_WRAP_SAME_PROPERTY(type, name, internal_obj) CV_WRAP_PROPERTY(type, name, name, internal_obj)
|
||||
#define CV_WRAP_SAME_PROPERTY_S(type, name, internal_obj) CV_WRAP_PROPERTY_S(type, name, name, internal_obj)
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************************\
|
||||
* Structures and macros for integration with IPP *
|
||||
\****************************************************************************************/
|
||||
|
||||
@@ -89,12 +89,12 @@ private:
|
||||
};
|
||||
|
||||
template<typename Y, typename D>
|
||||
struct PtrOwnerImpl : PtrOwner
|
||||
struct PtrOwnerImpl CV_FINAL : PtrOwner
|
||||
{
|
||||
PtrOwnerImpl(Y* p, D d) : owned(p), deleter(d)
|
||||
{}
|
||||
|
||||
void deleteSelf()
|
||||
void deleteSelf() CV_OVERRIDE
|
||||
{
|
||||
deleter(owned);
|
||||
delete this;
|
||||
|
||||
@@ -524,7 +524,7 @@ public:
|
||||
m_functor(functor)
|
||||
{ }
|
||||
|
||||
virtual void operator() (const cv::Range& range) const
|
||||
virtual void operator() (const cv::Range& range) const CV_OVERRIDE
|
||||
{
|
||||
m_functor(range);
|
||||
}
|
||||
@@ -558,7 +558,8 @@ void Mat::forEach_impl(const Functor& operation) {
|
||||
virtual ~PixelOperationWrapper(){}
|
||||
// ! Overloaded virtual operator
|
||||
// convert range call to row call.
|
||||
virtual void operator()(const Range &range) const {
|
||||
virtual void operator()(const Range &range) const CV_OVERRIDE
|
||||
{
|
||||
const int DIMS = mat->dims;
|
||||
const int COLS = mat->size[DIMS - 1];
|
||||
if (DIMS <= 2) {
|
||||
@@ -711,8 +712,8 @@ public:
|
||||
inline void cleanup() { TLSDataContainer::cleanup(); }
|
||||
|
||||
private:
|
||||
virtual void* createDataInstance() const {return new T;} // Wrapper to allocate data by template
|
||||
virtual void deleteDataInstance(void* pData) const {delete (T*)pData;} // Wrapper to release data by template
|
||||
virtual void* createDataInstance() const CV_OVERRIDE {return new T;} // Wrapper to allocate data by template
|
||||
virtual void deleteDataInstance(void* pData) const CV_OVERRIDE {delete (T*)pData;} // Wrapper to release data by template
|
||||
|
||||
// Disable TLS copy operations
|
||||
TLSData(TLSData &) {}
|
||||
|
||||
Reference in New Issue
Block a user