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 issue 8580 - Peek returns an invalid pointer for structs larger than Variant.size. #1934

Merged
1 commit merged into from Feb 17, 2014

Conversation

Kapps
Copy link
Contributor

@Kapps Kapps commented Feb 14, 2014

return type == typeid(T) ? cast(T*) &store : null;
if(type != typeid(T))
return null;
static if(T.sizeof <= size)
Copy link

Choose a reason for hiding this comment

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

Keep the parens whitespace style consistent please static if (, not static if(, same goes for the if statement above it.

@ghost
Copy link

ghost commented Feb 16, 2014

Other than the stylistic issue it looks good.

@Kapps
Copy link
Contributor Author

Kapps commented Feb 17, 2014

Added a commit to fix the style of if statements.

@ghost
Copy link

ghost commented Feb 17, 2014

Can you squash it into one commit? Style commits should only appear if they apply to old code, not new code.

…han Variant.size.

Style: Add space between if and condition.
@Kapps
Copy link
Contributor Author

Kapps commented Feb 17, 2014

Done I think? Not 100% sure if I rebased it correctly, but seems to be correct.

@ghost
Copy link

ghost commented Feb 17, 2014

Looks good! Will automerge when the tester starts running it. Thanks.

@ghost
Copy link

ghost commented Feb 17, 2014

Auto-merge toggled on

ghost pushed a commit that referenced this pull request Feb 17, 2014
Fix issue 8580 - Peek returns an invalid pointer for structs larger than Variant.size.
@ghost ghost merged commit 91c8510 into dlang:master Feb 17, 2014
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant