Aug. 16, 2023
7:29 p.m.
Jeffrey Smith (@whydoubt) commented about dlls/gdiplus/pathiterator.c:
> + i = iter->pathtype_pos;
> + if (i >= count) {
> + *result = 0;
> + return Ok;
> + }
> +
> + /* set starting point to first PathPointTypeStart and */
> + if ((iter->pathdata.Types[i] & PathPointTypePathTypeMask) == PathPointTypeStart) {
> + *start = i;
> + i++;
> + *end = i;
> + *type = iter->pathdata.Types[i] & PathPointTypePathTypeMask;
> + i++;
> + }
> + else
> + return Ok;
- If you swap the if/else blocks, the current if body doesn't need to be in a block:
```suggestion:-8+0
if ((iter->pathdata.Types[i] & PathPointTypePathTypeMask) != PathPointTypeStart)
return Ok;
*start = i;
i++;
*end = i;
*type = iter->pathdata.Types[i] & PathPointTypePathTypeMask;
i++;
```
- Why do you not set *result when you return?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3581#note_42514