From b305546950a6742f25023e2ffece423905e1bda8 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 28 Dec 2024 20:27:04 +0530 Subject: Refactor mode data type --- cpp/libchelleport.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp/libchelleport.cpp') diff --git a/cpp/libchelleport.cpp b/cpp/libchelleport.cpp index 5845bc4..53ba64e 100644 --- a/cpp/libchelleport.cpp +++ b/cpp/libchelleport.cpp @@ -13,12 +13,12 @@ extern "C" OCRMatch *findWordCoordinates(const char *image_path, int *size) { OCRMatchSet matches; MEASURE("OCR", { matches = extractTextMatches(image_path); }); - std::cout << "Match count: " << matches.size() << std::endl; - static OCRMatch *ptr = new OCRMatch[matches.size()]; std::copy(matches.begin(), matches.end(), ptr); *size = matches.size(); + std::cout << "Match count: " << *size << std::endl; + return ptr; } -- cgit v1.3.1