Commit 85f6765c authored by Edwin Carlinet's avatar Edwin Carlinet
Browse files

Small fixes (warning and build system).

	*  apps/smartdoc/CMakeLists.txt: Factorize objects build.
	*  apps/smartdoc/border_detection.cpp,
	*  apps/smartdoc/smartdoc.cpp: Fixes to remove warnings.
parent 077c04a8
add_library(smartdoc-objs OBJECT video_tools.cpp smartdoc.cpp export.cpp)
add_executable(smartdoc_app main.cpp
video_tools.cpp
smartdoc.cpp
export.cpp
$<TARGET_OBJECTS:smartdoc-objs>
$<TARGET_OBJECTS:g2-tools>
)
add_executable(smartdoc_app2 main2.cpp
video_tools.cpp
smartdoc.cpp
export.cpp
$<TARGET_OBJECTS:smartdoc-objs>
$<TARGET_OBJECTS:g2-tools>
)
......
......@@ -46,7 +46,7 @@ detect_start_end_x(const std::vector<mln::point2d>& V)
int start, end;
int i;
for (i = s; i < (V.size() - s); i += BORDER_IN)
for (i = s; i < int(V.size() - s); i += BORDER_IN)
if (abs(V[i][1] - V[i-s][1]) < START_END_STEP_T)
break;
start = i;
......@@ -69,7 +69,7 @@ detect_start_end_y(const std::vector<mln::point2d>& V)
int start, end;
int i;
for (i = s; i < (V.size() - s); i += BORDER_IN)
for (i = s; i < int(V.size() - s); i += BORDER_IN)
if (abs(V[i][0] - V[i-s][0]) < START_END_STEP_T)
break;
start = i;
......@@ -272,7 +272,7 @@ border_detection(const mln::image2d<mln::rgb8>& f,
if (debug_filename) {
image2d<rgb8> out = clone(f);
for (short x = 0; x < f.ncols(); ++x)
for (short x = 0; x < (int)f.ncols(); ++x)
{
short y1 = (c3 - a3 * x) / b3;
short y2 = (c4 - a4 * x) / b4;
......@@ -282,7 +282,7 @@ border_detection(const mln::image2d<mln::rgb8>& f,
if (out.domain().has(q)) out(q)[1] += 127;
}
for (short y = 0; y < f.nrows(); ++y)
for (short y = 0; y < (int)f.nrows(); ++y)
{
short x1 = (c1 - b1 * y) / a1;
short x2 = (c2 - b2 * y) / a2;
......
......@@ -289,7 +289,7 @@ process(tree_t& tree,
//
tree_t::node_type shp;
tree_t::node_type shp = tree.get_root();
{
float emax = value_traits<float>::min();
mln_foreach(auto x, tree.nodes())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment