mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 13:47:32 +08:00
Moved Scalar variable 'value' to int main() to work around a GCC -Wshadow warning in operations.hpp
This commit is contained in:
parent
83e21568ee
commit
230bc03d97
@ -15,7 +15,6 @@ using namespace cv;
|
||||
Mat src, dst;
|
||||
int top, bottom, left, right;
|
||||
int borderType;
|
||||
Scalar value;
|
||||
const char* window_name = "copyMakeBorder Demo";
|
||||
RNG rng(12345);
|
||||
|
||||
@ -64,7 +63,7 @@ int main( int, char** argv )
|
||||
else if( (char)c == 'r' )
|
||||
{ borderType = BORDER_REPLICATE; }
|
||||
|
||||
value = Scalar( rng.uniform(0, 255), rng.uniform(0, 255), rng.uniform(0, 255) );
|
||||
Scalar value( rng.uniform(0, 255), rng.uniform(0, 255), rng.uniform(0, 255) );
|
||||
copyMakeBorder( src, dst, top, bottom, left, right, borderType, value );
|
||||
|
||||
imshow( window_name, dst );
|
||||
|
Loading…
Reference in New Issue
Block a user