The definitions for IPL_DEPTH_8S, IPL_DEPTH_16S, and IPL_DEPTH_32S in vglOpencv.h previously used a bitwise OR operation involving IPL_DEPTH_SIGN directly. This caused narrowing conversion errors during compilation:
#define IPL_DEPTH_8S (IPL_DEPTH_SIGN | 8)
#define IPL_DEPTH_16S (IPL_DEPTH_SIGN | 16)
#define IPL_DEPTH_32S (IPL_DEPTH_SIGN | 32)
The updated version uses static_cast to address these errors, as follows:
#define IPL_DEPTH_8S (static_cast<int>(0x80000000) | 8)
#define IPL_DEPTH_16S (static_cast<int>(0x80000000U) | 16)
#define IPL_DEPTH_32S (static_cast<int>(0x80000000U) | 32)
The definitions for IPL_DEPTH_8S, IPL_DEPTH_16S, and IPL_DEPTH_32S in vglOpencv.h previously used a bitwise OR operation involving IPL_DEPTH_SIGN directly. This caused narrowing conversion errors during compilation:
The updated version uses static_cast to address these errors, as follows: