forked from nihui/opencv-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opencv-2.4.13.7-no-rtti.patch
144 lines (134 loc) · 4.74 KB
/
opencv-2.4.13.7-no-rtti.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
diff -Nuarp opencv-2.4.13.7/modules/core/src/glob.cpp opencv-2.4.13.7.nortti/modules/core/src/glob.cpp
--- opencv-2.4.13.7/modules/core/src/glob.cpp 2018-07-02 05:41:56.000000000 +0800
+++ opencv-2.4.13.7.nortti/modules/core/src/glob.cpp 2021-01-08 23:24:46.371298637 +0800
@@ -225,7 +225,6 @@ static void glob_rec(const cv::String& d
if ((dir = opendir (directory.c_str())) != 0)
{
/* find all the files and directories within directory */
- try
{
while ((ent = readdir (dir)) != 0)
{
@@ -247,11 +246,6 @@ static void glob_rec(const cv::String& d
}
}
}
- catch (...)
- {
- closedir(dir);
- throw;
- }
closedir(dir);
}
else CV_Error(CV_StsObjectNotFound, cv::format("could not open directory: %s", directory.c_str()));
diff -Nuarp opencv-2.4.13.7/modules/core/src/matrix.cpp opencv-2.4.13.7.nortti/modules/core/src/matrix.cpp
--- opencv-2.4.13.7/modules/core/src/matrix.cpp 2018-07-02 05:41:56.000000000 +0800
+++ opencv-2.4.13.7.nortti/modules/core/src/matrix.cpp 2021-01-08 23:24:59.991085589 +0800
@@ -279,7 +279,6 @@ Mat::Mat(const Mat& m, const Range& _row
}
*this = m;
- try
{
if( _rowRange != Range::all() && _rowRange != Range(0,rows) )
{
@@ -300,11 +299,6 @@ Mat::Mat(const Mat& m, const Range& _row
flags |= SUBMATRIX_FLAG;
}
}
- catch(...)
- {
- release();
- throw;
- }
if( rows == 1 )
flags |= CONTINUOUS_FLAG;
diff -Nuarp opencv-2.4.13.7/modules/core/src/persistence.cpp opencv-2.4.13.7.nortti/modules/core/src/persistence.cpp
--- opencv-2.4.13.7/modules/core/src/persistence.cpp 2018-07-02 05:41:56.000000000 +0800
+++ opencv-2.4.13.7.nortti/modules/core/src/persistence.cpp 2021-01-08 23:25:39.470468027 +0800
@@ -2918,18 +2918,12 @@ cvOpenFileStorage( const char* filename,
//mode = cvGetErrMode();
//cvSetErrMode( CV_ErrModeSilent );
- try
{
if( fs->fmt == CV_STORAGE_FORMAT_XML )
icvXMLParse( fs );
else
icvYMLParse( fs );
}
- catch (...)
- {
- cvReleaseFileStorage( &fs );
- throw;
- }
//cvSetErrMode( mode );
// release resources that we do not need anymore
@@ -4285,13 +4279,9 @@ icvReadSeq( CvFileStorage* fs, CvFileNod
flags |= CV_SEQ_FLAG_HOLE;
if( !strstr(flags_str, "untyped") )
{
- try
{
flags |= icvDecodeSimpleFormat(dt);
}
- catch(...)
- {
- }
}
}
diff -Nuarp opencv-2.4.13.7/modules/core/src/system.cpp opencv-2.4.13.7.nortti/modules/core/src/system.cpp
--- opencv-2.4.13.7/modules/core/src/system.cpp 2018-07-02 05:41:56.000000000 +0800
+++ opencv-2.4.13.7.nortti/modules/core/src/system.cpp 2021-01-08 23:25:56.543200966 +0800
@@ -571,8 +571,6 @@ void error( const Exception& exc )
static volatile int* p = 0;
*p = 0;
}
-
- throw exc;
}
CvErrorCallback
@@ -1160,14 +1158,9 @@ public:
TLSDataContainer* k = tlsContainers_[key];
if (!k)
return;
- try
{
k->deleteDataInstance(data);
}
- catch (...)
- {
- CV_DbgAssert(k == NULL); // Debug this!
- }
}
};
diff -Nuarp opencv-2.4.13.7/modules/imgproc/src/contours.cpp opencv-2.4.13.7.nortti/modules/imgproc/src/contours.cpp
--- opencv-2.4.13.7/modules/imgproc/src/contours.cpp 2018-07-02 05:41:56.000000000 +0800
+++ opencv-2.4.13.7.nortti/modules/imgproc/src/contours.cpp 2021-01-08 23:26:22.223799256 +0800
@@ -1681,7 +1681,6 @@ cvFindContours( void* img, CvMemStorag
}
else
{
- try
{
scanner = cvStartFindContours( img, storage, cntHeaderSize, mode, method, offset );
@@ -1692,12 +1691,6 @@ cvFindContours( void* img, CvMemStorag
}
while( contour != 0 );
}
- catch(...)
- {
- if( scanner )
- cvEndFindContours(&scanner);
- throw;
- }
*firstContour = cvEndFindContours( &scanner );
}
diff -Nuarp opencv-2.4.13.7/modules/photo/src/arrays.hpp opencv-2.4.13.7.nortti/modules/photo/src/arrays.hpp
--- opencv-2.4.13.7/modules/photo/src/arrays.hpp 2018-07-02 05:41:56.000000000 +0800
+++ opencv-2.4.13.7.nortti/modules/photo/src/arrays.hpp 2021-01-08 23:26:50.440357875 +0800
@@ -52,7 +52,6 @@ template <class T> struct Array2d {
{
if (array2d.needToDeallocArray) {
// copy constructor for self allocating arrays not supported
- throw new exception();
}
}