Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-13182: SpanSet.fromMask produces larger spans than image #305

Merged
merged 2 commits into from Jan 9, 2018

Conversation

PaulPrice
Copy link
Contributor

No description provided.

When doing SpanSet.fromMask(mask, 0xFF), the 'auto compareValue' is
inferred to be an integer ('pixel & maskVal' is an integer if there's
no '> 0') instead of a boolean, which violates the assumptions and
corrupts the 'runCounter'. Explicitly setting the type fixes it.
The use of 'runCounter' contributed to a bug (corrupting 'runCounter'
because 'compareValue' wasn't a boolean). Instead, use a boolean to
track whether we're in a span, and remember the starting value. This
saves on the need to do arithmetic at Span creation time and simplifies
the logic.
@PaulPrice PaulPrice merged commit bcd5cb3 into master Jan 9, 2018
@ktlim ktlim deleted the tickets/DM-13182 branch August 25, 2018 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant