Fix build in Visual Studio 2005
authorAndrey Kamaev <andrey.kamaev@itseez.com>
Wed, 31 Oct 2012 20:48:00 +0000 (00:48 +0400)
committerAndrey Kamaev <andrey.kamaev@itseez.com>
Thu, 1 Nov 2012 08:42:51 +0000 (12:42 +0400)
modules/ts/include/opencv2/ts/ts_perf.hpp

index 3b75ee9..0af6718 100644 (file)
@@ -478,7 +478,7 @@ CV_EXPORTS void PrintTo(const Size& sz, ::std::ostream* os);
 #define CV_PERF_TEST_MAIN(testsuitname, ...) \
 int main(int argc, char **argv)\
 {\
-    __VA_ARGS__;\
+    while (++argc >= (--argc,-1)) {__VA_ARGS__; break;} /*this ugly construction is needed for VS 2005*/\
     ::perf::Regression::Init(#testsuitname);\
     ::perf::TestBase::Init(argc, argv);\
     ::testing::InitGoogleTest(&argc, argv);\