SCM
filter_performers (SCM ell)
{
- for (SCM *tail = ℓ scm_is_pair (*tail); tail = SCM_CDRLOC (*tail))
+ SCM *tail = ℓ
+ for (SCM p = ell; scm_is_pair (p); p = scm_cdr (p))
{
if (dynamic_cast<Performer *> (unsmob_translator (scm_car (*tail))))
- {
- *tail = scm_cdr (*tail);
- if (!scm_is_pair (*tail))
- break;
- }
+ *tail = scm_cdr (*tail);
+ else
+ tail = SCM_CDRLOC(*tail);
}
return ell;
}
filter_engravers (SCM ell)
{
SCM *tail = ℓ
- for (; scm_is_pair (*tail); tail = SCM_CDRLOC (*tail))
+ for (SCM p = ell; scm_is_pair (p); p = scm_cdr (p))
{
if (dynamic_cast<Engraver *> (unsmob_translator (scm_car (*tail))))
- {
- *tail = scm_cdr (*tail);
- if (!scm_is_pair (*tail))
- break;
- }
+ *tail = scm_cdr (*tail);
+ else
+ tail = SCM_CDRLOC(*tail);
}
return ell;
}