Skip to content

Commit eb05c86

Browse files
committed
WinRT/WinCE/WP8 cleanup
1 parent d131137 commit eb05c86

File tree

19 files changed

+27
-64
lines changed

19 files changed

+27
-64
lines changed

modules/cannops/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(IOS OR WINRT OR ANDROID OR APPLE OR WIN32 OR (NOT HAVE_CANN))
1+
if(IOS OR ANDROID OR APPLE OR WIN32 OR (NOT HAVE_CANN))
22
ocv_module_disable(cannops)
33
endif()
44

modules/cudaarithm/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(IOS OR WINRT OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
1+
if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
22
ocv_module_disable(cudaarithm)
33
endif()
44

modules/cudacodec/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(IOS OR APPLE OR WINRT OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
1+
if(IOS OR APPLE OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
22
ocv_module_disable(cudacodec)
33
endif()
44

@@ -54,4 +54,4 @@ endif()
5454
ocv_create_module(${extra_libs})
5555

5656
ocv_add_accuracy_tests()
57-
ocv_add_perf_tests()
57+
ocv_add_perf_tests()

modules/cudafeatures2d/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(IOS OR WINRT OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
1+
if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
22
ocv_module_disable(cudafeatures2d)
33
endif()
44

modules/cudafilters/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(IOS OR WINRT OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
1+
if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
22
ocv_module_disable(cudafilters)
33
endif()
44

modules/cudaimgproc/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(IOS OR WINRT OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
1+
if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
22
ocv_module_disable(cudaimgproc)
33
endif()
44

modules/cudaoptflow/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(IOS OR WINRT OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
1+
if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
22
ocv_module_disable(cudaoptflow)
33
endif()
44

@@ -27,4 +27,4 @@ if(NOT CUDA_VERSION VERSION_LESS "10.0")
2727
add_definitions(-DHAVE_NVIDIA_OPTFLOW=2)
2828
ocv_include_directories(SYSTEM "${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH}/NVIDIAOpticalFlowSDK-${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_COMMIT}")
2929
endif()
30-
endif()
30+
endif()

modules/cudastereo/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(IOS OR WINRT OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
1+
if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
22
ocv_module_disable(cudastereo)
33
endif()
44

modules/cudawarping/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(IOS OR WINRT OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
1+
if(IOS OR (NOT HAVE_CUDA AND NOT BUILD_CUDA_STUBS))
22
ocv_module_disable(cudawarping)
33
endif()
44

modules/datasets/src/tinyxml2/tinyxml2.cpp

+1-15
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,7 @@ XMLUnknown* XMLDocument::NewUnknown( const char* str )
16661666

16671667
static FILE* callfopen( const char* filepath, const char* mode )
16681668
{
1669-
#if defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (!defined WINCE)
1669+
#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
16701670
FILE* fp = 0;
16711671
errno_t err = fopen_s( &fp, filepath, mode );
16721672
if ( err ) {
@@ -1862,17 +1862,7 @@ void XMLPrinter::Print( const char* format, ... )
18621862
}
18631863
else {
18641864
#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
1865-
#if defined(WINCE)
1866-
int len = 512;
1867-
do {
1868-
len = len*2;
1869-
char* str = new char[len]();
1870-
len = _vsnprintf(str, len, format, va);
1871-
delete[] str;
1872-
}while (len < 0);
1873-
#else
18741865
int len = _vscprintf( format, va );
1875-
#endif
18761866
#else
18771867
int len = vsnprintf( 0, 0, format, va );
18781868
#endif
@@ -1881,11 +1871,7 @@ void XMLPrinter::Print( const char* format, ... )
18811871
va_start( va, format );
18821872
char* p = _buffer.PushArr( len ) - 1; // back up over the null terminator.
18831873
#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
1884-
#if defined(WINCE)
1885-
_vsnprintf( p, len+1, format, va );
1886-
#else
18871874
vsnprintf_s( p, len+1, _TRUNCATE, format, va );
1888-
#endif
18891875
#else
18901876
vsnprintf( p, len+1, format, va );
18911877
#endif

modules/datasets/src/tinyxml2/tinyxml2.h

+12-15
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ distribution.
9191
#endif
9292

9393

94-
#if defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (!defined WINCE)
94+
#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
9595
// Microsoft visual studio, version 2005 and higher.
9696
/*int _snprintf_s(
9797
char *buffer,
@@ -109,9 +109,6 @@ inline int TIXML_SNPRINTF( char* buffer, size_t size, const char* format, ... )
109109
return result;
110110
}
111111
#define TIXML_SSCANF sscanf_s
112-
#elif defined WINCE
113-
#define TIXML_SNPRINTF _snprintf
114-
#define TIXML_SSCANF sscanf
115112
#else
116113
// GCC version 3 and higher
117114
//#warning( "Using sn* functions." )
@@ -506,13 +503,13 @@ class XMLUtil
506503
static bool IsWhiteSpace( char p ) {
507504
return !IsUTF8Continuation(p) && isspace( static_cast<unsigned char>(p) );
508505
}
509-
506+
510507
inline static bool IsNameStartChar( unsigned char ch ) {
511508
return ( ( ch < 128 ) ? isalpha( ch ) : 1 )
512509
|| ch == ':'
513510
|| ch == '_';
514511
}
515-
512+
516513
inline static bool IsNameChar( unsigned char ch ) {
517514
return IsNameStartChar( ch )
518515
|| isdigit( ch )
@@ -535,7 +532,7 @@ class XMLUtil
535532
}
536533
return false;
537534
}
538-
535+
539536
inline static int IsUTF8Continuation( const char p ) {
540537
return p & 0x80;
541538
}
@@ -1266,14 +1263,14 @@ class TINYXML2_LIB XMLElement : public XMLNode
12661263
return a->QueryFloatValue( value );
12671264
}
12681265

1269-
1266+
12701267
/** Given an attribute name, QueryAttribute() returns
12711268
XML_NO_ERROR, XML_WRONG_ATTRIBUTE_TYPE if the conversion
12721269
can't be performed, or XML_NO_ATTRIBUTE if the attribute
12731270
doesn't exist. It is overloaded for the primitive types,
12741271
and is a generally more convenient replacement of
12751272
QueryIntAttribute() and related functions.
1276-
1273+
12771274
If successful, the result of the conversion
12781275
will be written to 'value'. If not successful, nothing will
12791276
be written to 'value'. This allows you to provide default
@@ -1401,7 +1398,7 @@ class TINYXML2_LIB XMLElement : public XMLNode
14011398
@verbatim
14021399
<foo>Hullaballoo!<b>This is text</b></foo>
14031400
@endverbatim
1404-
1401+
14051402
For this XML:
14061403
@verbatim
14071404
<foo />
@@ -1415,13 +1412,13 @@ class TINYXML2_LIB XMLElement : public XMLNode
14151412
/// Convenience method for setting text inside and element. See SetText() for important limitations.
14161413
void SetText( int value );
14171414
/// Convenience method for setting text inside and element. See SetText() for important limitations.
1418-
void SetText( unsigned value );
1415+
void SetText( unsigned value );
14191416
/// Convenience method for setting text inside and element. See SetText() for important limitations.
1420-
void SetText( bool value );
1417+
void SetText( bool value );
14211418
/// Convenience method for setting text inside and element. See SetText() for important limitations.
1422-
void SetText( double value );
1419+
void SetText( double value );
14231420
/// Convenience method for setting text inside and element. See SetText() for important limitations.
1424-
void SetText( float value );
1421+
void SetText( float value );
14251422

14261423
/**
14271424
Convenience method to query the value of a child text node. This is probably best
@@ -1673,7 +1670,7 @@ class TINYXML2_LIB XMLDocument : public XMLNode
16731670
}
16741671
/// If there is an error, print it to stdout.
16751672
void PrintError() const;
1676-
1673+
16771674
/// Clear the document, resetting it to the initial state.
16781675
void Clear();
16791676

modules/julia/cmake/init.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
OCV_OPTION(WITH_JULIA "Include Julia support (opencv_contrib)" OFF IF (NOT ANDROID AND NOT IOS AND NOT WINRT AND NOT WIN32))
1+
OCV_OPTION(WITH_JULIA "Include Julia support (opencv_contrib)" OFF IF (NOT ANDROID AND NOT IOS AND NOT WIN32))
22

33
ocv_assert(OPENCV_INITIAL_PASS)
44

modules/matlab/cmake/init.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
OCV_OPTION(WITH_MATLAB "Include Matlab support (opencv_contrib)" OFF IF (NOT ANDROID AND NOT IOS AND NOT WINRT))
1+
OCV_OPTION(WITH_MATLAB "Include Matlab support (opencv_contrib)" OFF IF (NOT ANDROID AND NOT IOS))
22

33
ocv_assert(OPENCV_INITIAL_PASS)
44

modules/superres/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(IOS OR WINRT)
1+
if(IOS)
22
ocv_module_disable(superres)
33
endif()
44

modules/tracking/perf/perf_main.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ static
77
void initTrackingTests()
88
{
99
const char* extraTestDataPath =
10-
#ifdef WINRT
11-
NULL;
12-
#else
1310
getenv("OPENCV_DNN_TEST_DATA_PATH");
14-
#endif
1511
if (extraTestDataPath)
1612
cvtest::addDataSearchPath(extraTestDataPath);
1713

modules/tracking/test/test_main.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ static
77
void initTrackingTests()
88
{
99
const char* extraTestDataPath =
10-
#ifdef WINRT
11-
NULL;
12-
#else
1310
getenv("OPENCV_DNN_TEST_DATA_PATH");
14-
#endif
1511
if (extraTestDataPath)
1612
cvtest::addDataSearchPath(extraTestDataPath);
1713

modules/videostab/CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,5 @@ if(HAVE_CUDA)
44
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations -Wshadow -Wunused-parameter)
55
endif()
66

7-
if(DEFINED WINRT AND NOT DEFINED ENABLE_WINRT_MODE_NATIVE)
8-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW")
9-
endif()
10-
117
ocv_define_module(videostab opencv_imgproc opencv_features2d opencv_video opencv_photo opencv_3d
128
OPTIONAL opencv_cudawarping opencv_cudaoptflow opencv_videoio WRAP python)

modules/wechat_qrcode/perf/perf_main.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ void initQRTests()
88
{
99
#ifdef HAVE_OPENCV_DNN
1010
const char* extraTestDataPath =
11-
#ifdef WINRT
12-
NULL;
13-
#else
1411
getenv("OPENCV_DNN_TEST_DATA_PATH");
15-
#endif
1612
if (extraTestDataPath)
1713
cvtest::addDataSearchPath(extraTestDataPath);
1814
#endif // HAVE_OPENCV_DNN

modules/wechat_qrcode/test/test_main.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ void initTests()
1616
{
1717
#ifdef HAVE_OPENCV_DNN
1818
const char* extraTestDataPath =
19-
#ifdef WINRT
20-
NULL;
21-
#else
2219
getenv("OPENCV_DNN_TEST_DATA_PATH");
23-
#endif
2420
if (extraTestDataPath)
2521
cvtest::addDataSearchPath(extraTestDataPath);
2622
#endif // HAVE_OPENCV_DNN

0 commit comments

Comments
 (0)