From 2b1d270a06eef6fef9e343bd9845ba103d299c7a Mon Sep 17 00:00:00 2001 From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org> Date: Sun, 27 Sep 2009 11:37:45 +0800 Subject: [PATCH] REFAC: TestHelper: limit the scope of variables --- Testing/Code/otbTestHelper.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Testing/Code/otbTestHelper.cxx b/Testing/Code/otbTestHelper.cxx index e522aebef4..683c1f4999 100644 --- a/Testing/Code/otbTestHelper.cxx +++ b/Testing/Code/otbTestHelper.cxx @@ -133,9 +133,6 @@ int TestHelper::RegressionTestAsciiFile(const char * testAsciiFileName, const ch { strfileref = *itRef; strfiletest = *itTest; - otb::StringStream buffstreamRef, buffstreamTest; - buffstreamRef << strfileref; - //Check is the current line should be ignored bool ignoreCurrentLineRef = false; @@ -164,6 +161,8 @@ int TestHelper::RegressionTestAsciiFile(const char * testAsciiFileName, const ch //ignored one if the order does not matter if ((!ignoreCurrentLineRef) && (!ignoreCurrentLineTest)) { + otb::StringStream buffstreamRef, buffstreamTest; + buffstreamRef << strfileref; buffstreamTest << strfiletest; //Number of differences in the current line bool differenceFoundInCurrentLine = false; -- GitLab