lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coding style


From: Joe Neeman
Subject: Re: Coding style
Date: Thu, 13 Jan 2011 19:57:04 +0700

On Thu, Jan 13, 2011 at 7:19 PM, David Kastrup <address@hidden> wrote:

Hi,

in note-collision.cc I read the following:

 Direction d = UP;
 do
   {
     vector<Grob*> &clashes (clash_groups[d]);
     vector_sort (clashes, Note_column::shift_less);
   }
 while ((flip (&d)) != UP);

Uh, is there any reason not to just write

 vector_sort (clash_groups[UP], Note_column::shift_less);
 vector_sort (clash_groups[DOWN], Note_column::shift_less);

I find it somewhat strange to make a loop for two simple function calls.

Sure, you can go ahead and change that. Maybe at some point there was more code in the loop...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]