Re: [Ekiga-devel-list] Cleanup 2
- From: Julien Puydt <jpuydt free fr>
- To: Ekiga development mailing list <ekiga-devel-list gnome org>
- Subject: Re: [Ekiga-devel-list] Cleanup 2
- Date: Fri, 04 Jun 2010 20:59:29 +0200
Le 04/06/2010 17:49, Eugen Dedu a écrit :
bool val = false;
g_return_if_fail (data != NULL);
if (gm_conf_entry_get_type (entry) == GM_CONF_BOOL) {
val = gm_conf_entry_get_bool (entry);
ekiga_main_window_set_stay_on_top (EKIGA_MAIN_WINDOW (data), val);
}
I would like to remove the initialisation of val, it serves no purpose.
The same for:
GtkStatusIcon *statusicon = NULL;
GtkWidget *main_window = NULL;
main_window = GnomeMeeting::Process ()->GetMainWindow ();
statusicon = GTK_STATUS_ICON (GnomeMeeting::Process ()->GetStatusicon ());
etc.
Does someone disagree in removing unuseful initialisations?
Well, statically they just look useless ; but if you think dynamically
about the code, the fact that the pointers get associated to a
segfaulting value right at the declaration point... then you get a code
which will be better.
Snark
PS : Notice though that we should probably use some sort of smart
pointers here.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]