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

Surround the statement if switch-case block contains declarations. #1285

Merged
merged 1 commit into from May 23, 2017

Conversation

@mephisto41
Copy link
Contributor

mephisto41 commented May 23, 2017

This fix #1206 .


This change is Reviewable

@nical
Copy link
Collaborator

nical commented May 23, 2017

It would be great to add this to the list of driver issues, even if this is not strictly coming from a driver. Or remind me to do it when I come back from vacation next week.

@@ -42,11 +42,15 @@ void write_color(vec4 color, float style, bool flip) {

switch (int(style)) {
case BORDER_STYLE_GROOVE:
{

This comment has been minimized.

@kvark

kvark May 23, 2017

Member

I don't see declarations in these switch cases. Are they also a problem?

This comment has been minimized.

@mephisto41

mephisto41 May 23, 2017

Author Contributor

Forget to explain this case. See 1, ANGLE will translate ternary operator to type s; if(b) s = x; else s = y;. And type s is a declaration.

This comment has been minimized.

@kvark

kvark May 23, 2017

Member

omg, that's somewhat obscure
thanks for clarification!

@kvark
Copy link
Member

kvark commented May 23, 2017

I'll add it to the wiki.
Thanks for the fix!
@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented May 23, 2017

📌 Commit 2f850a0 has been approved by kvark

@bors-servo
Copy link
Contributor

bors-servo commented May 23, 2017

Testing commit 2f850a0 with merge 42c0436...

bors-servo added a commit that referenced this pull request May 23, 2017
Surround the statement if switch-case block contains declarations.

This fix #1206 .

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1285)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented May 23, 2017

☀️ Test successful - status-travis
Approved by: kvark
Pushing 42c0436 to master...

@bors-servo bors-servo merged commit 2f850a0 into servo:master May 23, 2017
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.