Xnest: explicit GC operation struct initialization

Just doing array-like listing of the init values is error-prone:
somebody might change the order in the struct and things will going wild.

Better be explicit about which fields are assigned to which values.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-09-05 10:43:40 +02:00
parent 1dbffd9368
commit 889a25e4cc

View File

@ -42,36 +42,36 @@ is" without express or implied warranty.
DevPrivateKeyRec xnestGCPrivateKeyRec; DevPrivateKeyRec xnestGCPrivateKeyRec;
static GCFuncs xnestFuncs = { static GCFuncs xnestFuncs = {
xnestValidateGC, .ValidateGC = xnestValidateGC,
xnestChangeGC, .ChangeGC = xnestChangeGC,
xnestCopyGC, .CopyGC = xnestCopyGC,
xnestDestroyGC, .DestroyGC = xnestDestroyGC,
xnestChangeClip, .ChangeClip = xnestChangeClip,
xnestDestroyClip, .DestroyClip = xnestDestroyClip,
xnestCopyClip, .CopyClip = xnestCopyClip,
}; };
static GCOps xnestOps = { static GCOps xnestOps = {
xnestFillSpans, .FillSpans = xnestFillSpans,
xnestSetSpans, .SetSpans = xnestSetSpans,
xnestPutImage, .PutImage = xnestPutImage,
xnestCopyArea, .CopyArea = xnestCopyArea,
xnestCopyPlane, .CopyPlane = xnestCopyPlane,
xnestPolyPoint, .PolyPoint = xnestPolyPoint,
xnestPolylines, .Polylines = xnestPolylines,
xnestPolySegment, .PolySegment = xnestPolySegment,
xnestPolyRectangle, .PolyRectangle = xnestPolyRectangle,
xnestPolyArc, .PolyArc = xnestPolyArc,
xnestFillPolygon, .FillPolygon = xnestFillPolygon,
xnestPolyFillRect, .PolyFillRect = xnestPolyFillRect,
xnestPolyFillArc, .PolyFillArc = xnestPolyFillArc,
xnestPolyText8, .PolyText8 = xnestPolyText8,
xnestPolyText16, .PolyText16 = xnestPolyText16,
xnestImageText8, .ImageText8 = xnestImageText8,
xnestImageText16, .ImageText16 = xnestImageText16,
xnestImageGlyphBlt, .ImageGlyphBlt = xnestImageGlyphBlt,
xnestPolyGlyphBlt, .PolyGlyphBlt = xnestPolyGlyphBlt,
xnestPushPixels .PushPixels = xnestPushPixels
}; };
Bool Bool