Skip to content

Commit

Permalink
layers: Fix a Wbitwise-instead-of-logical warning
Browse files Browse the repository at this point in the history
`a || b` only evaluates b if a is false. `a | b` always evaluates
both a and b. If a and b are of type bool, `||` is usually what you
want, so clang now warns on `|` where both arguments are of type bool.

Here, it doesn't make a difference. Use `||` to make clang happy.
  • Loading branch information
nico authored and ncesario-lunarg committed Oct 8, 2021
1 parent 719ae2b commit 5127939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layers/render_pass_state.cpp
Expand Up @@ -132,7 +132,7 @@ static void RecordRenderPassDAG(const VkRenderPassCreateInfo2 *pCreateInfo, REND
const auto prev_pass = prev.first->pass;
const auto &prev_depends = pass_depends[prev_pass];
for (uint32_t j = 0; j < prev_pass; j++) {
depends[j] = depends[j] | prev_depends[j];
depends[j] = depends[j] || prev_depends[j];
}
depends[prev_pass] = true;
}
Expand Down

0 comments on commit 5127939

Please sign in to comment.