File tree 4 files changed +32
-6
lines changed
4 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ endif()
173
173
########################################
174
174
175
175
set (unicharset_training_src
176
+ icuerrorcode.cpp
176
177
icuerrorcode.h
177
178
lang_model_helpers.cpp
178
179
lang_model_helpers.h
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ libtesseract_training_la_SOURCES = \
65
65
commandlineflags.cpp \
66
66
commontraining.cpp \
67
67
degradeimage.cpp \
68
+ icuerrorcode.cpp \
68
69
lang_model_helpers.cpp \
69
70
ligature_table.cpp \
70
71
lstmtester.cpp \
Original file line number Diff line number Diff line change
1
+ // /////////////////////////////////////////////////////////////////////
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ // Unless required by applicable law or agreed to in writing, software
8
+ // distributed under the License is distributed on an "AS IS" BASIS,
9
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ // See the License for the specific language governing permissions and
11
+ // limitations under the License.
12
+ //
13
+ // /////////////////////////////////////////////////////////////////////
14
+
15
+ #include " icuerrorcode.h"
16
+
17
+ namespace tesseract {
18
+
19
+ // Destructor.
20
+ // It is defined here, so the compiler can create a single vtable
21
+ // instead of weak vtables in every compilation unit.
22
+ IcuErrorCode::~IcuErrorCode () {
23
+ if (isFailure ()) {
24
+ handleFailure ();
25
+ }
26
+ }
27
+
28
+ } // namespace tesseract.
Original file line number Diff line number Diff line change 7
7
*
8
8
* Features:
9
9
* - The constructor initializes the internal UErrorCode to U_ZERO_ERROR,
10
- * removing one common source of errors.
10
+ * removing one common source of errors.
11
11
* - Same use in C APIs taking a UErrorCode* (pointer) and C++ taking
12
12
* UErrorCode& (reference), via conversion operators.
13
13
* - Automatic checking for success when it goes out of scope. On failure,
@@ -44,11 +44,7 @@ namespace tesseract {
44
44
class IcuErrorCode : public icu ::ErrorCode {
45
45
public:
46
46
IcuErrorCode () {}
47
- virtual ~IcuErrorCode () {
48
- if (isFailure ()) {
49
- handleFailure ();
50
- }
51
- }
47
+ virtual ~IcuErrorCode ();
52
48
53
49
protected:
54
50
virtual void handleFailure () const {
You can’t perform that action at this time.
0 commit comments