Commit 230bc03d authored by Bahram Dahi's avatar Bahram Dahi

Moved Scalar variable 'value' to int main() to work around a GCC -Wshadow warning in operations.hpp

parent 83e21568
...@@ -15,7 +15,6 @@ using namespace cv; ...@@ -15,7 +15,6 @@ using namespace cv;
Mat src, dst; Mat src, dst;
int top, bottom, left, right; int top, bottom, left, right;
int borderType; int borderType;
Scalar value;
const char* window_name = "copyMakeBorder Demo"; const char* window_name = "copyMakeBorder Demo";
RNG rng(12345); RNG rng(12345);
...@@ -64,7 +63,7 @@ int main( int, char** argv ) ...@@ -64,7 +63,7 @@ int main( int, char** argv )
else if( (char)c == 'r' ) else if( (char)c == 'r' )
{ borderType = BORDER_REPLICATE; } { 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 ); copyMakeBorder( src, dst, top, bottom, left, right, borderType, value );
imshow( window_name, dst ); imshow( window_name, dst );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment