Esme Povirk (@madewokherd) commented about dlls/gdiplus/image.c:
- else if (IsEqualGUID(&guid, &ColorBalanceEffectGuid))
- {
ef = malloc(sizeof(CGpEffect));ef->type = ColorBalanceEffect;- }
- else if (IsEqualGUID(&guid, &LevelsEffectGuid))
- {
ef = malloc(sizeof(CGpEffect));ef->type = LevelsEffect;- }
- else if (IsEqualGUID(&guid, &ColorCurveEffectGuid))
- {
ef = malloc(sizeof(CGpEffect));ef->type = ColorCurveEffect;- }
- else
This could be simplified by moving the `malloc` call to after the big if statement, and storing the type in a local variable.