Fixing compilation errors in windows and mac

This commit is contained in:
Aman Verma 2015-10-19 10:58:43 +00:00
parent b0209ad7f7
commit d5e314e728
2 changed files with 7 additions and 3 deletions

View File

@ -446,6 +446,8 @@ CV_IMPL void cvSetTrackbarMax(const char* trackbar_name, const char* window_name
slider = [[window sliders] valueForKey:[NSString stringWithFormat:@"%s", trackbar_name]];
if(slider) {
if(maxval >= 0) {
int minval = [[slider slider] minValue];
maxval = (minval>maxval)?minval:maxval;
[[slider slider] setMaxValue:maxval];
}
}
@ -464,7 +466,6 @@ CV_IMPL void cvSetTrackbarMin(const char* trackbar_name, const char* window_name
NSAutoreleasePool* localpool5 = nil;
__BEGIN__;
//cout << "cvSetTrackbarPos" << endl;
if(trackbar_name == NULL || window_name == NULL)
CV_ERROR( CV_StsNullPtr, "NULL trackbar or window name" );
@ -476,6 +477,8 @@ CV_IMPL void cvSetTrackbarMin(const char* trackbar_name, const char* window_name
slider = [[window sliders] valueForKey:[NSString stringWithFormat:@"%s", trackbar_name]];
if(slider) {
if(minval >= 0) {
int maxval = [[slider slider] maxValue];
minval = (minval<maxval)?minval:maxval;
[[slider slider] setMinValue:minval];
}
}
@ -485,7 +488,7 @@ CV_IMPL void cvSetTrackbarMin(const char* trackbar_name, const char* window_name
__END__;
}
CV_IMPL void* cvGetWindowHandle( const char* name )k
CV_IMPL void* cvGetWindowHandle( const char* name )
{
//cout << "cvGetWindowHandle" << endl;
return cvGetWindow(name);

View File

@ -138,6 +138,7 @@ typedef struct CvTrackbar
int* data;
int pos;
int maxval;
int minval;
void (*notify)(int);
void (*notify2)(int, void*);
void* userdata;
@ -2341,7 +2342,7 @@ CV_IMPL void cvSetTrackbarMin(const char* trackbar_name, const char* window_name
__BEGIN__;
if (maxval >= 0)
if (minval >= 0)
{
CvWindow* window = 0;
CvTrackbar* trackbar = 0;