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

Fix sample error in docs #1

Merged
merged 2 commits into from
May 22, 2019
Merged

Fix sample error in docs #1

merged 2 commits into from
May 22, 2019

Conversation

superzscy
Copy link

No description provided.

@coveralls
Copy link

coveralls commented Jan 12, 2019

Pull Request Test Coverage Report for Build 184

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 80.324%

Totals Coverage Status
Change from base Build 183: 0.0%
Covered Lines: 3172
Relevant Lines: 3949

💛 - Coveralls

Copy link
Owner

@owent owent left a comment

Choose a reason for hiding this comment

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

Thank you for your patch.But we don't assume user use the c11 standard(which is not default for old GCC & clang even compiling with -std
=c++11 or higher). So we should not use memcpy_s in sample or unit test.

Anyway, there is no need to copy the data block, we can use std::cout.write(reinterpret_cast<const char*>(buffer), length); instead.

I will fix the compile problem and the terminate character of string latter and then put this code into sample project。Still thanks for your contribution.

@owent owent merged commit cc13961 into owent:master May 22, 2019
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.

3 participants