[haiku-commits] Re: haiku: hrev45596 - src/kits/interface

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-commits@xxxxxxxxxxxxx" <haiku-commits@xxxxxxxxxxxxx>
  • Date: Thu, 2 May 2013 12:34:40 -0400

On Thu, May 2, 2013 at 11:03 AM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:
> Am 02/05/2013 00:24, schrieb jscipione@xxxxxxxxx:
>
>> +       float latchDimension = be_plain_font->Size();
>> +       float indentWidth = be_control_look->DefaultItemSpacing();
>
> [...]
>
>> +       float latchDimension = be_plain_font->Size();
>> +       float indentWidth = be_control_look->DefaultItemSpacing();
>
> [...]
>
>> +       float latchDimension = be_plain_font->Size();
>> +       float indentWidth = be_control_look->DefaultItemSpacing();
>
> Nice, but did you ever hear that code duplication is a bad thing? If not,
> please let me tell you: it is a bad thing! :-)

In my defense these pieces were already repeated, I just didn't change
that but I did give the repeated variables descriptive names rather
than just 10.0f and 15.0f. I await your patch clearing this up. :)

Other related posts: