[ros-dev] GDI_TABLE_ENTRY structure
Alex Ionescu
ionucu at videotron.ca
Fri Aug 31 00:54:43 CEST 2007
Hey,
Yes I was in a hurry, sorry.
1) a. Modifying a well known, Microsoft-documented structure.
b. Using structure-based bit logic instead of shifts and masks.
2) a. I think this is clear.
b. I think it makes the code less maintainable, harder to
understand, less clean, and potentially hurts performance. This
becomes a significantly bigger problem when thinking about other
architectures with alignment requirements, or different endianness.
3) Use macros to hide away the mask/offsets, or better yet, inlined functions.
On 8/30/07, James Tabor
<jimtabor at adsl-64-217-116-74.dsl.hstntx.swbell.net> wrote:
> Alex Ionescu wrote:
> > I disagree.
> >
> > On 8/30/07, *Ged* <gerard.murphy at amteus.com
> > <mailto:gerard.murphy at amteus.com>> wrote:
> >
> > Timo Kreuzer wrote:e
> >
> > > So I have created a new GDI_TABLE_ENTRY struct and a new type
> > GDIHANDLE.
> >
> > Looks good, a thumbs up from me :)
> >
> > 1 comment:
> >
> > > #pragma pack(push,1)
> > #include <pshpack1.h>
> >
> > > #pragma pack(pop)
> > #include <poppack.h>
> >
> > Ged.
> >
> Oh I see,,, The structures are okay but using them like a macro, no.
> James
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
>
--
Best regards,
Alex Ionescu
More information about the Ros-dev
mailing list