Re: [Ekiga-devel-list] Cleanup 1
- From: Julien Puydt <jpuydt free fr>
- To: Ekiga development mailing list <ekiga-devel-list gnome org>
- Subject: Re: [Ekiga-devel-list] Cleanup 1
- Date: Fri, 04 Jun 2010 20:53:05 +0200
Le 04/06/2010 17:47, Eugen Dedu a écrit :
Hi,
I would like to remove blank lines when they are not necessary. For ex.,
in main_window.cpp:
gint section = 0;
g_return_if_fail (data != NULL);
if (gm_conf_entry_get_type (entry) == GM_CONF_INT) {
section = gm_conf_entry_get_int (entry);
ekiga_main_window_set_panel_section (EKIGA_MAIN_WINDOW (data), section);
All these lines could be removed.
Another example: remove all the blank lines from:
static void
pull_trigger_cb (GtkWidget * /*widget*/,
gpointer data)
{
Ekiga::Trigger *trigger = (Ekiga::Trigger *) data;
g_return_if_fail (trigger != NULL);
trigger->pull ();
}
Does someone disagree?
Yes, blank lines make the code more readable.
In the examples you gave :
- we have variable declarations ;
- then basic checks for arguments sanity ;
- finally the code.
And even in the code, I find it more readable to have :
if (condition) {
// code
}
than:
if (condition) {
// code
}
Snark
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]