"Calling Construct() twice or more on a same instance is not allowed for this class.");
std::unique_ptr<_QrCodeRecognizerImpl> pQrCodeRecognizerImpl(new (std::nothrow) _QrCodeRecognizerImpl());
- SysTryReturn(NID_UIX, pQrCodeRecognizerImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysSecureTryReturn(NID_UIX, pQrCodeRecognizerImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
__pQrCodeRecognizerImpl = pQrCodeRecognizerImpl.release();
return __pQrCodeRecognizerImpl->Init() ? E_SUCCESS : E_FAILURE;
{
SysAssertf(__pQrCodeRecognizerImpl != null, "Not yet constructed! Consruct() should be called before use.");
- SysTryReturn(NID_UIX, width > 0 && height > 0, false, E_INVALID_ARG,
- "raw pointer must not be null. [E_INVALID_ARG]");
+ SysSecureTryReturn(NID_UIX, width > 0 && height > 0, false, E_INVALID_ARG,
+ "width and height must be greater then 0. [E_INVALID_ARG]");
return __pQrCodeRecognizerImpl->SetFrameSize(width, height) ? E_SUCCESS : E_FAILURE;
}
{
SysAssertf(__pQrCodeRecognizerImpl != null, "Not yet constructed! Consruct() should be called before use.");
- static float array[4] = {0.f};
+ static int array[4] = {0};
result r = __pQrCodeRecognizerImpl->GetROI(array) ? E_SUCCESS : E_FAILURE;
if (r == E_SUCCESS)
{
SysAssertf(__pQrCodeRecognizerImpl != null, "Not yet constructed! Consruct() should be called before use.");
- SysTryReturn(NID_UIX, imageBuffer.GetPointer(), false, E_INVALID_ARG,
+ SysSecureTryReturn(NID_UIX, imageBuffer.GetPointer(), false, E_INVALID_ARG,
"image buffer must not be null. [E_INVALID_ARG]");
return __pQrCodeRecognizerImpl->ProcessFrame((unsigned char*) imageBuffer.GetPointer()) ? E_SUCCESS : E_FAILURE;