sciai-lab / mutex-watershed

The mutex watershed for image segmentation.
63 stars 13 forks source link

Windows VS2019 build fix: avoided 'and' keyword for logical and. #8

Closed felixrichards closed 3 years ago

felixrichards commented 3 years ago

Bug description

Building with conda create -n mws -c conda-forge xtensor-python breaks with Visual Studio 2019 build tools, and possibly (probably) for other VS versions. The following errors are reported

src/main.cpp(487): error C2146: syntax error: missing ')' before identifier 'and'
src/main.cpp(487): error C2065: 'and': undeclared identifier
src/main.cpp(487): error C2146: syntax error: missing ';' before identifier 'num_iterations'
src/main.cpp(487): error C2059: syntax error: ')'
src/main.cpp(488): error C2146: syntax error: missing ';' before identifier 'finished'

Cause

Keyword 'and' for logical and on L487.

Solution

Removed the keyword and replaced with nested ifs.