Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Fastest way to check if a value exist using standard C++

I often have to test whether a class "exists"

Do something IF cv::Rect is not empty/nil?
Do something IF cv::Mat is not empty/nil?

In Objective-C is easy:

// the object exist so do what you want

is there any possible way to test simply these classes?

Today i do this:

If(myMat.rows != 0){
// My Mat is not empty


If(myRect.width != 0){
// My Rect is not empty

is there another way to do this?