Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Fix libnop headers being private in CMake #206

Closed
wants to merge 3 commits into from
Closed

Conversation

lw
Copy link
Contributor

@lw lw commented Sep 4, 2020

And a missing const_cast

lw added 3 commits September 4, 2020 08:35

Verified

This commit was signed with the committer’s verified signature.
iOvergaard Jacob Overgaard

Verified

This commit was signed with the committer’s verified signature.
iOvergaard Jacob Overgaard

Verified

This commit was signed with the committer’s verified signature.
iOvergaard Jacob Overgaard
@@ -17,7 +17,8 @@ namespace channel {
Channel::TDescriptor saveDescriptor(const AbstractNopHolder& object) {
const size_t len = object.getSize();
Channel::TDescriptor out(len, '\0');
NopWriter writer(reinterpret_cast<uint8_t*>(out.data()), len);
NopWriter writer(
const_cast<uint8_t*>(reinterpret_cast<const uint8_t*>(out.data())), len);
Copy link
Contributor

Choose a reason for hiding this comment

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

You could also use reinterpret_cast<uint8_t*>(&out[0]).

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@lw has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

@lw merged this pull request in 49bcc3e.

@lw lw deleted the libnop_cmake branch September 7, 2020 18:27
lw added a commit that referenced this pull request Sep 20, 2021
Summary:
And a missing const_cast

Pull Request resolved: #206

Reviewed By: beauby

Differential Revision: D23540899

Pulled By: lw

fbshipit-source-id: d97bbbfa541f8598aa351c9701b2507e3f7759a0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants