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

Conan #92

Merged
merged 10 commits into from
Apr 21, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix maybe-used-uninitialized error
  • Loading branch information
igagis committed Apr 20, 2021
commit 4b52fdade41bf73c2448bf4e5ac7fcbf453334ed
6 changes: 3 additions & 3 deletions src/svgren/filter_applier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ filter_result blend(const surface& in, const surface& in2, svgdom::fe_blend_elem
*/
r4::vector3<real> cr;
switch(mode){
default:
ASSERT(false)
[[fallthrough]];
case svgdom::fe_blend_element::mode::normal:
// cr = (1 - qa) * cb + ca
cr = c02 * (real(1) - c01.a()) + c01;
Expand All @@ -533,9 +536,6 @@ filter_result blend(const surface& in, const surface& in2, svgdom::fe_blend_elem
// cr = max((1 - qa) * cb + ca, (1 - qb) * ca + cb)
cr = max(c02 * (1 - c01.a()) + c01, c01 * (1 - c02.a()) + c02);
break;
default:
ASSERT(false)
break;
}
// qr = 1 - (1 - qa) * (1 - qb)
auto qr = 1 - (1 - c01.a()) * (1 - c02.a());
Expand Down