Laex / Delphi-OpenCV

Project Delphi-OpenCV. Translation of OpenCV library header files in Delphi
500 stars 226 forks source link

CvSet1D/2D/3D probably wrong declaration #117

Closed HuguesDug closed 5 years ago

HuguesDug commented 5 years ago

Hello,

{$EXTERNALSYM cvSet1D} procedure cvSet1D(arr: pCvArr; idx0: Integer; var value: TCvScalar); cdecl; {$EXTERNALSYM cvSet2D} procedure cvSet2D(arr: pCvArr; idx0, idx1: Integer; var value: TCvScalar); cdecl; {$EXTERNALSYM cvSet3D} procedure cvSet3D(arr: pCvArr; idx0, idx1, idx2: Integer; var value: TCvScalar); cdecl; {$EXTERNALSYM cvSetND} procedure cvSetND(arr: pCvArr; idx: pInteger; var value: TCvScalar); cdecl;

I think the var front of value is too much. I recognize that while restructuring an old code based on a different opencv library. It rung the bell... and comparing the too versions of Wrapper, I recognize you have added a "var" in yours... but seing the c code, I don't see the point.

This apply to all SetxD functions, being Scallar or Real.

HuguesDug commented 5 years ago

Hello,

I confirm the bug that I described above : all the var statements in the "CvSetxD" or "CvSetReaxDl" to be removed.

I have used intensivelly these functions recently in a project, and I can confirm you have to update "ocv.core_C.pas"

HuguesDug commented 5 years ago

Thanks for the update.