Re: [gtk-list] Re: Dumb question about GTK--



Tero Pulkkinen <terop@students.cc.tut.fi> writes:
> // the c++ magic to specify something that C does automatically for all enums.
> #ifdef __cplusplus
> GdkEventMask operator|(GdkEventMask a, GdkEventMask b) { 
>     return (GdkEventMask)(a|b);
> }
> GdkEventMask operator&(GdkEventMask a, GdkEventMask b) { 
>     return (GdkEventMask)(a&b);
> }
> #endif

oops, this doesnt work :)

needs to be:

  return (GdkEventMask)( (int)a | (int)b );

(otherwise it does infinite recursion :)

-- 
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]