mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 13:10:12 +08:00
Fixing compilation errors in windows and mac
This commit is contained in:
parent
b0209ad7f7
commit
d5e314e728
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user