Skip to content

Commit c171898

Browse files
committed
fix: windows build error
1 parent 8599255 commit c171898

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/OcrLiteCApi.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern "C"
1515
#endif
1616

1717
typedef void *OCR_HANDLE;
18-
typedef char BOOL;
18+
typedef char OCR_BOOL;
1919

2020
#ifndef NULL
2121
#define NULL 0
@@ -41,12 +41,12 @@ _QM_OCR_API OCR_HANDLE
4141
OcrInit(const char *szDetModel, const char *szClsModel, const char *szRecModel, const char *szKeyPath, int nThreads,
4242
int gpuIndex);
4343

44-
_QM_OCR_API BOOL
44+
_QM_OCR_API OCR_BOOL
4545
OcrDetect(OCR_HANDLE handle, const char *imgPath, const char *imgName, OCR_PARAM *pParam);
4646

4747
_QM_OCR_API int OcrGetLen(OCR_HANDLE handle);
4848

49-
_QM_OCR_API BOOL OcrGetResult(OCR_HANDLE handle, char *szBuf, int nLen);
49+
_QM_OCR_API OCR_BOOL OcrGetResult(OCR_HANDLE handle, char *szBuf, int nLen);
5050

5151
_QM_OCR_API void OcrDestroy(OCR_HANDLE handle);
5252

src/OcrLiteCApi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ OcrInit(const char *szDetModel, const char *szClsModel, const char *szRecModel,
2727

2828
}
2929

30-
_QM_OCR_API BOOL
30+
_QM_OCR_API OCR_BOOL
3131
OcrDetect(OCR_HANDLE handle, const char *imgPath, const char *imgName, OCR_PARAM *pParam) {
3232

3333
OCR_OBJ *pOcrObj = (OCR_OBJ *) handle;
@@ -74,7 +74,7 @@ _QM_OCR_API int OcrGetLen(OCR_HANDLE handle) {
7474
return pOcrObj->strRes.size() + 1;
7575
}
7676

77-
_QM_OCR_API BOOL OcrGetResult(OCR_HANDLE handle, char *szBuf, int nLen) {
77+
_QM_OCR_API OCR_BOOL OcrGetResult(OCR_HANDLE handle, char *szBuf, int nLen) {
7878
OCR_OBJ *pOcrObj = (OCR_OBJ *) handle;
7979
if (!pOcrObj)
8080
return FALSE;

0 commit comments

Comments
 (0)