Skip to content
Snippets Groups Projects
Commit a4323104 authored by even's avatar even
Browse files

Code: Pierre's fixes

parent 84edee1c
No related branches found
No related tags found
No related merge requests found
...@@ -407,7 +407,7 @@ int BSDetector::detect (const Pt2i &p1, const Pt2i &p2, ...@@ -407,7 +407,7 @@ int BSDetector::detect (const Pt2i &p1, const Pt2i &p2,
- mydsl.manhattan (bsf->getLastLeft ()); - mydsl.manhattan (bsf->getLastLeft ());
if (mydrlf < 0) mydrlf = -mydrlf; // Case of horizontal P1P2 if (mydrlf < 0) mydrlf = -mydrlf; // Case of horizontal P1P2
int expansion = 1 + mydrlf; int expansion = 1 + mydrlf;
if (expansion < 20 && bsf->size () < (expansion * 4) / 5) if (expansion < 20 && (int) (bsf->size ()) < (expansion * 4) / 5)
return RESULT_FINAL_TOO_SPARSE; return RESULT_FINAL_TOO_SPARSE;
} }
...@@ -416,7 +416,7 @@ int BSDetector::detect (const Pt2i &p1, const Pt2i &p2, ...@@ -416,7 +416,7 @@ int BSDetector::detect (const Pt2i &p1, const Pt2i &p2,
if (finalFragmentationTestOn) if (finalFragmentationTestOn)
{ {
int bsccp = bsf->countOfConnectedPoints (fragmentMinSize); int bsccp = bsf->countOfConnectedPoints (fragmentMinSize);
int bssize = bsf->getAllPoints().size (); int bssize = (int) (bsf->getAllPoints().size ());
if (bsccp < bssize / 2) return RESULT_FINAL_TOO_FRAGMENTED; if (bsccp < bssize / 2) return RESULT_FINAL_TOO_FRAGMENTED;
} }
...@@ -557,7 +557,7 @@ int BSDetector::staticDetect (const Pt2i &p1, const Pt2i &p2, ...@@ -557,7 +557,7 @@ int BSDetector::staticDetect (const Pt2i &p1, const Pt2i &p2,
- mydsl.manhattan (bsf->getLastLeft ()); - mydsl.manhattan (bsf->getLastLeft ());
if (mydrlf < 0) mydrlf = -mydrlf; // Case of horizontal P1P2 if (mydrlf < 0) mydrlf = -mydrlf; // Case of horizontal P1P2
int expansion = 1 + mydrlf; int expansion = 1 + mydrlf;
if (bsf->size () < expansion / 2) if ((int) (bsf->size ()) < expansion / 2)
return RESULT_FINAL_TOO_SPARSE; return RESULT_FINAL_TOO_SPARSE;
} }
...@@ -566,7 +566,7 @@ int BSDetector::staticDetect (const Pt2i &p1, const Pt2i &p2, ...@@ -566,7 +566,7 @@ int BSDetector::staticDetect (const Pt2i &p1, const Pt2i &p2,
if (finalFragmentationTestOn) if (finalFragmentationTestOn)
{ {
int bsccp = bsf->countOfConnectedPoints (fragmentMinSize); int bsccp = bsf->countOfConnectedPoints (fragmentMinSize);
int bssize = bsf->getAllPoints().size (); int bssize = (int) (bsf->getAllPoints().size ());
if (bsccp < bssize / 2) return RESULT_FINAL_TOO_FRAGMENTED; if (bsccp < bssize / 2) return RESULT_FINAL_TOO_FRAGMENTED;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment