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-14353: remove or fix bad C++ usage in FootprintSet.cc #351

Merged
merged 6 commits into from May 11, 2018

Conversation

TallJimbo
Copy link
Member

There are a lot of stylistic things that I have not touched; I'm just trying to fix code that is incorrect, likely to emit warnings, or bad in a way that could affect performance.

PaulPrice and others added 5 commits May 8, 2018 10:03
Thanks to Sogo Mineo (NAOJ) who identified the bug through gcc 8.1 and
provided the fix.
The code in the removed block that not already been #ifdef'd
out was rife with serious errors that had gone unnoticed until
recently because they were in templates that were not being
instantiated (because they were only used in code that had
been #ifdef'd out).
IdSpan is barely larger than shared_ptr itself, and
holding it by value avoids both an extra level of
indirection and a lot of thread-atomic reference counting.
@RobertLuptonTheGood
Copy link
Member

Please don't squash that "remove disabled ..." changeset. The algorithm (a flood-fill) was used in peak culling and may need to be brought back to life.

Removing it now is fine.

Copy link
Contributor

@PaulPrice PaulPrice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment.

@@ -714,15 +714,15 @@ static void findFootprints(
}

if (in_span) {
auto sp = std::make_shared<IdSpan>(in_span, y, x0, width - 1, good);
IdSpan sp(in_span, y, x0, width - 1, good);
spans.push_back(sp);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest using emplace_back, here and above.

@TallJimbo TallJimbo merged commit acd707f into master May 11, 2018
@ktlim ktlim deleted the tickets/DM-14353 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

3 participants