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

Use vector for dynamic memory in sample (closes #612) #616

Merged
merged 1 commit into from Dec 14, 2016

Conversation

nathan-russell
Copy link
Contributor

This replaces the use of alloca, Calloc, and Free with std::vector.

@@ -13,6 +13,7 @@ RnwWeave: Sweave
LaTeX: pdfLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes
Copy link
Member

Choose a reason for hiding this comment

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

Great!

@@ -1,8 +1,13 @@
2016-12-13 Nathan Russell <russell.nr2012@gmail.com>
2016-12-14 Nathan Russell <russell.nr2012@gmail.com>
Copy link
Member

Choose a reason for hiding this comment

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

Yup.


// In order to mirror the behavior of `base::sample`
// as closely as possible, this file contains adaptations
#include <vector>
Copy link
Member

Choose a reason for hiding this comment

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

Code below looks good. I trust the tests...

@codecov-io
Copy link

Current coverage is 62.42% (diff: 100%)

Merging #616 into master will not change coverage

@@             master       #616   diff @@
==========================================
  Files            69         69          
  Lines          4798       4798          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           2995       2995          
  Misses         1803       1803          
  Partials          0          0          

Powered by Codecov. Last update 2a0d5b3...0e38823

@eddelbuettel eddelbuettel merged commit e4ca728 into RcppCore:master Dec 14, 2016
@nathan-russell nathan-russell deleted the bugfix/sample-v2 branch April 23, 2017 23:11
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

5 participants