Skip to content

Commit

Permalink
fix: windows build error
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminwan committed Jun 18, 2022
1 parent 8599255 commit c171898
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions include/OcrLiteCApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extern "C"
#endif

typedef void *OCR_HANDLE;
typedef char BOOL;
typedef char OCR_BOOL;

#ifndef NULL
#define NULL 0
Expand All @@ -41,12 +41,12 @@ _QM_OCR_API OCR_HANDLE
OcrInit(const char *szDetModel, const char *szClsModel, const char *szRecModel, const char *szKeyPath, int nThreads,
int gpuIndex);

_QM_OCR_API BOOL
_QM_OCR_API OCR_BOOL
OcrDetect(OCR_HANDLE handle, const char *imgPath, const char *imgName, OCR_PARAM *pParam);

_QM_OCR_API int OcrGetLen(OCR_HANDLE handle);

_QM_OCR_API BOOL OcrGetResult(OCR_HANDLE handle, char *szBuf, int nLen);
_QM_OCR_API OCR_BOOL OcrGetResult(OCR_HANDLE handle, char *szBuf, int nLen);

_QM_OCR_API void OcrDestroy(OCR_HANDLE handle);

Expand Down
4 changes: 2 additions & 2 deletions src/OcrLiteCApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ OcrInit(const char *szDetModel, const char *szClsModel, const char *szRecModel,

}

_QM_OCR_API BOOL
_QM_OCR_API OCR_BOOL
OcrDetect(OCR_HANDLE handle, const char *imgPath, const char *imgName, OCR_PARAM *pParam) {

OCR_OBJ *pOcrObj = (OCR_OBJ *) handle;
Expand Down Expand Up @@ -74,7 +74,7 @@ _QM_OCR_API int OcrGetLen(OCR_HANDLE handle) {
return pOcrObj->strRes.size() + 1;
}

_QM_OCR_API BOOL OcrGetResult(OCR_HANDLE handle, char *szBuf, int nLen) {
_QM_OCR_API OCR_BOOL OcrGetResult(OCR_HANDLE handle, char *szBuf, int nLen) {
OCR_OBJ *pOcrObj = (OCR_OBJ *) handle;
if (!pOcrObj)
return FALSE;
Expand Down

0 comments on commit c171898

Please sign in to comment.