Re: [glade--]Compilation errors with Glade-2/glademm generated project
Christof Petig <[email protected]>
| Newsgroups | gmane.comp.gnome.glademm |
|---|---|
| Organization | Adolf Petig GmbH & Co. KG |
| Message-ID | <[email protected]> |
Scott McLoughlin wrote:
> Christof,
>
> I'm going through the souce code. I see that main() immediately
> calls call_gtkmm_config(). This in turn calls,
>
> CheckVersion("pkg-config --version", Configuration.pc_version,....)
> if( Configurationgnome2) {
> if(!!Configuration.pc_version) {
> ....
>
> Also, the variable Configuration configuration; will cause the constructor
>
> Configuration::Configuration()
>
> to be called prior to main()'s call to call_gtkmm_config().
no problem. really. It's intended that way.
>
> Going through this call chain, I can't see where Configuration.gnome2
> will be set. What am I missing?
should be fixed in CVS. (the call_gtkmm_config() at the top of main()
was a leftover from a previous copy+paste)
>
> Also two comments.
>
> (1) The declaration Configuration Configuration will cause source
> readers to think that membervariables like 'gnome2' are static member
> variable. Something like 'Configuration theconfiguration' might be clearer.
Do you know of a good OSS source reader?
> (2) What's is logic of 'if(!!Configuration.pc_version)' in the above test.
> Why the double not?
operator! is defined for Pkg_Config, operator bool not. Since ! hardly
has any side effects but an operator bool can get called in many many
unexpected innocent looking statements I try to avoid it.
And operator bool semantically should mean the same as !! while being
more dangerous (implicit unwanted conversion to e.g. int without a warning).
Christof