mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 13:34:10 +00:00
Fix error checking for failure type in example
validity_failure_type is an enum, not a bitflag. Correct example code that looked like it was trying to treat it as a bitflag, but instead assumed that any failure was fixable.
This commit is contained in:
parent
135b9264fd
commit
eb617fa1c8
@ -32,7 +32,7 @@ int main()
|
||||
|
||||
// if the invalidity is only due to lack of closing points and/or wrongly oriented rings, then bg::correct can fix it
|
||||
bool could_be_fixed = (failure == boost::geometry::failure_not_closed
|
||||
|| boost::geometry::failure_wrong_orientation);
|
||||
|| failure == boost::geometry::failure_wrong_orientation);
|
||||
std::cout << "is valid? " << (valid ? "yes" : "no") << std::endl;
|
||||
if (! valid)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user