On Mon, 5 Sep 2022 23:41:40 GMT, SWinxy <[email protected]> wrote: > The `SDRenderType` enum is often returned using a variable declared at the > start of functions. These can be inlined in the `return` itself. Using a > ternary operator condenses what may be 12 lines into one, in the most extreme > cases. `doRectUsingCG` and `doPolyUsingCG` were both modified more than the > rest, but still are equivalent. > > Example change: > > SDRenderType renderType = SD_Nothing; > > if (fill == YES) > { > renderType = SD_Fill; > } > else > { > renderType = SD_Stroke; > } > > // ... > > return renderType; > > > > // ... > > return fill ? SD_Fill : SD_Stroke;
Hey, @TheShermanTanker, could you please create an issue number for this? Thanks! I have emailed the client-dev group after you mentioned it (though I prefer to keep discussions centralized here, bah). I thought in the past that the checks were necessary but nope, they fail just because. ------------- PR: https://git.openjdk.org/jdk/pull/10174
