Changes between Version 29 and Version 30 of Hacking


Ignore:
Timestamp:
05/09/19 12:27:43 (6 years ago)
Author:
andrew_b
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Hacking

    v29 v30  
    117117 
    118118Do not unnecessarily use braces where a single statement will do.  
    119 If lines is more than one to use braces. 
    120119 
    121120'''This is right:''' 
     
    126125    ... 
    127126} 
    128  
    129 for (j = 0; j < 10; j++) 
    130 { 
    131     for (i = 0; str_options[i].opt_name != NULL; i++) 
    132         g_free (*str_options[i].opt_addr); 
    133 } 
    134 }}} 
    135  
    136 '''This is wrong:''' 
    137 {{{ 
    138 if (xterm_flag && xterm_title) { 
    139     path = strip_home_and_password (current_panel->cwd); 
    140     ... 
    141 } 
    142  
    143 if (xterm_flag && xterm_title) 
    144 { 
    145     path = strip_home_and_password (current_panel->cwd); } 
    146127 
    147128for (k = 0; k < 10; k++) 
     
    149130        for (i = 0; str_options[i].opt_name != NULL; i++) 
    150131            g_free (*str_options[i].opt_addr); 
     132} 
     133}}} 
     134 
     135'''This is wrong:''' 
     136{{{ 
     137if (xterm_flag && xterm_title) { 
     138    path = strip_home_and_password (current_panel->cwd); 
     139    ... 
     140} 
     141 
     142if (xterm_flag && xterm_title) 
     143{ 
     144    path = strip_home_and_password (current_panel->cwd); } 
    151145}}} 
    152146