Re: [gtk-list] Re: Gtk--: Why does this (specific code) compile at all?






> I don't know Gtk--, but I do know C++.
>
> Maybe there are two add() functions:
>
>   void add(Gtk_Widget &child, ...)
>   void add(Gtk_Widget *child, ...)
>
> add() is an overloaded function and everything works as expected.

I can find 2 add functions (in packer.h):
     void add (     Gtk_Widget &child,
               GtkSideType side,
               ... default args ...);
     void add (const Gtk_ObjectHandle<Gtk_Widget> &child,
               ... default args ...);

Seems like I'm using the 2nd one ... still not sure why this isn't
flagged as an error ... most other functions which require a
reference (such as pack_start, etc.) flag this as wrong (seen
it *many* times) ...

> Another thing is: do you compile with all warnings on? g++ uses the
> "-Wall" option, IRIX MipsPRO C++ uses "-fullwarn".

Yes, always. Nothing's worse than thinking your code is clean only
to find that adding -Wall produces tons of ugly warnings ...

Thanks/Greetings
--> R




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