SysTry -> SysSecureTry
[platform/framework/native/vision.git] / src / FUixVisionQrCodeRecognizer.cpp
index be6a792..d979a99 100644 (file)
@@ -43,7 +43,7 @@ QrCodeRecognizer::Construct(void)
             "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;
@@ -54,8 +54,8 @@ QrCodeRecognizer::SetImageSize(int width, int height)
 {
     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;
 }
@@ -65,7 +65,7 @@ QrCodeRecognizer::GetFocusRoi(Tizen::Graphics::Rectangle& roi)
 {
     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)
@@ -95,7 +95,7 @@ QrCodeRecognizer::ProcessImage(const Tizen::Base::ByteBuffer& imageBuffer)
 {
     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;