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

Partio::clone() implementation and tests #50

Merged
merged 4 commits into from
Aug 28, 2015
Merged

Conversation

davvid
Copy link
Member

@davvid davvid commented Aug 26, 2015

Implement Partio::clone() and add unit tests demonstrating its usage.

Use the same libdir as parito itself by default while allowing
the user to override the value if necessary.
Use cut instead of sed with better fallback examples.
clone() does a full copy of both FixedAttributes and particle data.  If
only the FixedAttributes are wanted, the caller can pass particles=false
to avoid copying particles.
size_t size = Partio::TypeSize(dstFixedAttr.type) * dstFixedAttr.count;
std::memcpy(dst, src, size);
}
if (!particles) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer forward logic so
if(particles){ big block }

return p

(also gives single exit)

aselle added a commit that referenced this pull request Aug 28, 2015
Partio::clone() implementation and tests
@aselle aselle merged commit 50cde67 into wdas:master Aug 28, 2015
@davvid davvid deleted the clone branch August 9, 2017 23:35
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.

2 participants