From 230bc03d97789683c70540b647a180fad3dfe4fa Mon Sep 17 00:00:00 2001 From: Bahram Dahi Date: Fri, 16 Aug 2013 08:14:32 -0700 Subject: [PATCH] Moved Scalar variable 'value' to int main() to work around a GCC -Wshadow warning in operations.hpp --- samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp b/samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp index 4b2783e..a4b8bad 100644 --- a/samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp +++ b/samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp @@ -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 ); -- 2.7.4