mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
added error handling to some methods (2)
Added error handlings to the methods of following classes or modules -CvPoint2D32f -CvPoint3D32f -CvRect -CvScalar -CvSeq -CvSize -CvSize2D32f -CvSlice -CvSURFParams -CvSURFPoint -CvTermCriteria -CvTwoPoints -CvUtils -CvVideoWriter -GUI -IplConvKernel -IplImage -MouseEvent -OpenCV -Trackbar -Window
This commit is contained in:
parent
ea55e0d42e
commit
b3016fc68c
31 changed files with 407 additions and 245 deletions
|
@ -64,8 +64,9 @@ rb_allocate(VALUE klass)
|
|||
VALUE
|
||||
rb_initialize(VALUE self, VALUE start, VALUE end)
|
||||
{
|
||||
CVSLICE(self)->start_index = NUM2INT(start);
|
||||
CVSLICE(self)->end_index = NUM2INT(end);
|
||||
CvSlice *self_ptr = CVSLICE(self);
|
||||
self_ptr->start_index = NUM2INT(start);
|
||||
self_ptr->end_index = NUM2INT(end);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -99,7 +100,7 @@ rb_end_index_aref(VALUE self)
|
|||
VALUE
|
||||
rb_start_index_aset(VALUE self, VALUE index)
|
||||
{
|
||||
CVSLICE(self)->start_index = FIX2INT(index);
|
||||
CVSLICE(self)->start_index = NUM2INT(index);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -111,7 +112,7 @@ rb_start_index_aset(VALUE self, VALUE index)
|
|||
VALUE
|
||||
rb_end_index_aset(VALUE self, VALUE index)
|
||||
{
|
||||
CVSLICE(self)->end_index = FIX2INT(index);
|
||||
CVSLICE(self)->end_index = NUM2INT(index);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue