Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

why getCvtScaleAbsFunc is static but getConvertFunc not ?

I had a look in modules/core/src/convert.cpp There is getConvertFunc which is non-static and declared in modules/core/src/precomp.hpp

Just above getConvertFunc, there's getCvtScaleAbsFunc which is static, and this doesn't appear in modules/core/src/precomp.hpp I checked in 3.1.0 and yesterday's master/head. The situation was same in both revision.

These two functions are very similar, but the way they are declared are different. I feel that there was some mistake during in the past commits, but I couldn't figure out which way is the correct way to go. There's also getCopyMaskFunc which appears in precomp.hpp, and non-static, so I think getCvtScaleAbsFunc should become non-static and declared in precomp.hpp. If anyone knows if there are any particular reason why only this getCvtScaleAbsFunc has been defined as static, I'd like to know.

Thanks in advance.