[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Coding style
From: |
David Kastrup |
Subject: |
Coding style |
Date: |
Thu, 13 Jan 2011 13:19:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
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.
--
David Kastrup
- Coding style,
David Kastrup <=