8000 opencv: fix C++ nested template argument list syntax error · LumiGuide/haskell-opencv@55d4913 · GitHub
[go: up one dir, main page]

Skip to content

Commit 55d4913

Browse files
committed
opencv: fix C++ nested template argument list syntax error
Fixes #104 [53 of 71] Compiling OpenCV.ImgProc.StructuralAnalysis ( .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/OpenCV/ImgProc/StructuralAnalysis.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/OpenCV/ImgProc/StructuralAnalysis.o ) /tmp/ghc18962_0/ghc_578.cpp: In function ‘void inline_c_OpenCV_ImgProc_StructuralAnalysis_2(cv::Mat*, int32_t, int32_t, int32_t*, cv::Point2i****, cv::Vec4i***, int32_t**)’: /tmp/stack4848/opencv-0.0.2.0//tmp/ghc18962_0/ghc_578.cpp:59:40: error: error: ‘>>’ should be ‘> >’ within a nested template argument list std::vector<std::vector<cv::Point>> contours; ^ | 59 | std::vector<std::vector<cv::Point>> contours; | ^ /tmp/stack4848/opencv-0.0.2.0//tmp/ghc18962_0/ghc_578.cpp:83:45: error: error: ‘>>’ should be ‘> >’ within a nested template argument list for (std::vector<std::vector<cv::Point>>::size_type i = 0; i < contours.size(); i++) { ^ | 83 | for (std::vector<std::vector<cv::Point>>::size_type i = 0; i < contours.size(); i++) { | ^ `gcc' failed in phase `C Compiler'. (Exit code: 1)
1 parent 9c927ba commit 55d4913

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

opencv/src/OpenCV/ImgProc/Drawing.hsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ drawContours contours color drawMode img = unsafePrimToPrim $
813813
[C.exp|void {
814814
int32_t *contourLengths = $(int32_t * contourLengthsPtr);
815815
Point2i * contoursPtr = $(Point2i * contoursPtrPtr);
816-
std::vector<std::vector<cv::Point>> contours;
816+
std::vector< std::vector<cv::Point> > contours;
817817
int32_t numContours = $(int32_t numContours);
818818

819819
int k = 0;

opencv/src/OpenCV/ImgProc/StructuralAnalysis.hsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ findContours mode method src = unsafePrimToPrim $
207207
alloca $ \(hierarchyPtrPtr :: Ptr (Ptr (Ptr C'Vec4i))) ->
208208
alloca $ \(numContoursPtr :: Ptr Int32) -> mask_ $ do
209209
[C.block| void {
210-
std::vector<std::vector<cv::Point>> contours;
210+
std::vector< std::vector<cv::Point> > contours;
211211
std::vector<cv::Vec4i> hierarchy;
212212
cv::findContours(
213213
*$(Mat * srcPtr),
@@ -231,7 +231,7 @@ findContours mode method src = unsafePrimToPrim $
231231
int32_t * contourLengthsPtr = new int32_t [contours.size()];
232232
*contourLengthsPtrPtr = contourLengthsPtr;
233233

234-
for (std::vector<std::vector<cv::Point>>::size_type i = 0; i < contours.size(); i++) {
234+
for (std::vector< std::vector<cv::Point> >::size_type i = 0; i < contours.size(); i++) {
235235
std::vector<cv::Point> & contourPoints = contours[i];
236236
cv::Vec4i hierarchyInfo = hierarchy[i];
237237

0 commit comments

Comments
 (0)
0