#include "rest-collision.hh"
#include <cmath> // ceil.
-using namespace std;
#include "directional-element-interface.hh"
#include "duration.hh"
#include "warn.hh"
#include "lily-imports.hh"
+using std::vector;
+
MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Rest_collision, force_shift_callback_rest, 2, 1, "");
SCM
Rest_collision::force_shift_callback_rest (SCM rest, SCM offset)
if (scm_is_number (offset))
rest_grob->translate_axis (scm_to_double (offset), Y_AXIS);
- if (Note_column::has_interface (parent) && Note_column::has_rests (parent))
+ if (has_interface<Note_column> (parent) && Note_column::has_rests (parent))
{
Grob *collision = unsmob<Grob> (parent->get_object ("rest-collision"));
for (vsize i = 0; i < elts.size (); i++)
{
Grob *e = elts[i];
- if (Note_column::has_interface (e))
+ if (has_interface<Note_column> (e))
{
if (unsmob<Grob> (e->get_object ("rest")))
rests.push_back (e);
notedim.unite (notes[i]->extent (common, Y_AXIS));
}
- Real y = dir * max (0.0,
+ Real y = dir * std::max (0.0,
-dir * restdim[-dir] + dir * notedim[dir] + minimum_dist);
// move discretely by half spaces.