[1/5] gdiplus: Retrive LOGFONT from a GpFont using GdipGetLogFontW instead of accessing it directly.

Alexandre Julliard julliard at winehq.org
Thu May 10 13:48:59 CDT 2012


Dmitry Timoshkov <dmitry at 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 at winehq.org



More information about the wine-devel mailing list