Skip to content

Conversation

@AWoloszyn
Copy link
Contributor

Fixes #2617.

}

if !(flushRange.memory in DeviceMemories) { vkErrorInvalidDeviceMemory(flushRange.memory) }
if !(flushRange.memory in DeviceMemories) { vkErrorInvalidDeviceMemory(flushRange.memory) } else {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for not bothering indenting this block of code?

Side comment: I don't like inline if statements, however I won't push new styles if it's the standard for these .api source files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the reason that we have been doing this is because we can't early-return in the API language.

We use this pattern so that we don't add incredible amounts of nesting.
What I REALLY want to say is

if !(flush.memory in DeviceMemories) { return; }

@AWoloszyn AWoloszyn merged commit 2f286f4 into google:master Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants