Re: [1/5] gdiplus: Retrive LOGFONT from a GpFont using GdipGetLogFontW instead of accessing it directly.
Dmitry Timoshkov <dmitry(a)baikal.ru> writes:
@@ -4926,12 +4925,15 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics, TRACE("(%p %s %d %p %s %p %d %p)\n", graphics, debugstr_w(string), length, font, debugstr_rectf(layoutRect), stringFormat, regionCount, regions);
- if (!(graphics && string && font && layoutRect && stringFormat && regions)) + if (!graphics || !string || !font || !layoutRect || !stringFormat || !regions) return InvalidParameter;
Please avoid mixing that sort of gratuitous change with the real changes.
+ stat = GdipGetLogFontW((GpFont *)font, graphics, &lfw); + if (stat != Ok) return stat;
I'm not sure it's an improvement, since you need to add these ugly casts. You should find a way that doesn't require that. -- Alexandre Julliard julliard(a)winehq.org
Alexandre Julliard <julliard(a)winehq.org> wrote:
+ stat = GdipGetLogFontW((GpFont *)font, graphics, &lfw); + if (stat != Ok) return stat;
I'm not sure it's an improvement, since you need to add these ugly casts. You should find a way that doesn't require that.
I don't see a way to avoid that, gdiplus APIs are broken in that regard. -- Dmitry.
+ stat = GdipGetLogFontW((GpFont *)font, graphics, &lfw); + if (stat != Ok) return stat;
I'm not sure it's an improvement, since you need to add these ugly casts. You should find a way that doesn't require that.
I don't see a way to avoid that, gdiplus APIs are broken in that regard.
It's true, I've had to do that sort of thing before because the gdiplus API is inconsistent in applying const.
participants (3)
-
Alexandre Julliard -
Dmitry Timoshkov -
Vincent Povirk