Skip to content

Commit 6d3ef92

Browse files
committed
Fix cmake macos build: Change the macro definition from classify_enable_adaptive_matcher to CLASSIFY_ENABLE_ADAPTIVE_MATCHER_OVERRIDE to avoid conflicts with the BOOL_MEMBER parameter declaration in classify.cpp
1 parent 196622d commit 6d3ef92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/classify/adaptmatch.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ namespace tesseract {
7575
// TODO: The parameter classify_enable_adaptive_matcher can cause
7676
// a segmentation fault if it is set to false (issue #256),
7777
// so override it here.
78-
#define classify_enable_adaptive_matcher true
78+
#define CLASSIFY_ENABLE_ADAPTIVE_MATCHER_OVERRIDE true
7979

8080
#define ADAPT_TEMPLATE_SUFFIX ".a"
8181

@@ -465,7 +465,7 @@ void Classify::EndAdaptiveClassifier() {
465465
std::string Filename;
466466
FILE *File;
467467

468-
if (AdaptedTemplates != nullptr && classify_enable_adaptive_matcher &&
468+
if (AdaptedTemplates != nullptr && CLASSIFY_ENABLE_ADAPTIVE_MATCHER_OVERRIDE &&
469469
classify_save_adapted_templates) {
470470
Filename = imagefile + ADAPT_TEMPLATE_SUFFIX;
471471
File = fopen(Filename.c_str(), "wb");
@@ -525,7 +525,7 @@ void Classify::EndAdaptiveClassifier() {
525525
* enables use of pre-adapted templates
526526
*/
527527
void Classify::InitAdaptiveClassifier(TessdataManager *mgr) {
528-
if (!classify_enable_adaptive_matcher) {
528+
if (!CLASSIFY_ENABLE_ADAPTIVE_MATCHER_OVERRIDE) {
529529
return;
530530
}
531531
if (AllProtosOn != nullptr) {

0 commit comments

Comments
 (0)