app_server: fix order of initialization

GCC 13 warns that the a pointer is taken from a member that according to the
rules is not yet initialized. Fix the declaration and order of initialization
to prevent us depending on undefined behavior.

Change-Id: Iab4644c33a3a286e083450da0b3575acfe284f29
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6650
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Niels Sascha Reedijk 2023-06-24 21:27:38 +01:00 committed by Adrien Destugues
parent a962cc5543
commit 5cd344f75a
2 changed files with 4 additions and 4 deletions

View File

@ -204,7 +204,6 @@ private:
Painter::Painter()
:
fInternal(fPatternHandler),
fSubpixelPrecise(false),
fValidClipping(false),
fAttached(false),
@ -221,7 +220,8 @@ Painter::Painter()
fPatternHandler(),
fTextRenderer(fSubpixRenderer, fRenderer, fRendererBin, fUnpackedScanline,
fSubpixUnpackedScanline, fSubpixRasterizer, fMaskedUnpackedScanline,
fTransform)
fTransform),
fInternal(fPatternHandler)
{
fPixelFormat.SetDrawingMode(fDrawingMode, fAlphaSrcMode, fAlphaFncMode);

View File

@ -331,8 +331,6 @@ private:
friend class BitmapPainter; // needed only for gcc2
private:
mutable PainterAggInterface fInternal;
// for internal coordinate rounding/transformation
bool fSubpixelPrecise : 1;
bool fValidClipping : 1;
@ -355,6 +353,8 @@ private:
// it is setup to load from a specific Freetype supported
// font file which it gets from ServerFont
mutable AGGTextRenderer fTextRenderer;
mutable PainterAggInterface fInternal;
};