- {
- bool warn = true;
- if (to_boolean (sync))
- {
- tr = tr->where_defined (ly_symbol2scm ("measurePosition"));
- Moment zero;
- tr->set_property ("measurePosition", zero.smobbed_copy ());
- }
- else
- {
- SCM lf = tr->get_property ("barCheckLastFail");
- if (unsmob_moment (lf)
- && *unsmob_moment (lf) == *where)
- warn = false;
- else
- tr->set_property ("barCheckLastFail", mp);
- }
+ {
+ bool warn = true;
+ if (to_boolean (sync))
+ {
+ SCM mp;
+ tr = tr->where_defined (ly_symbol2scm ("measurePosition"), &mp);
+ Moment zero;
+ tr->set_property ("measurePosition", zero.smobbed_copy ());
+ }
+ else
+ {
+ SCM lf = tr->get_property ("barCheckLastFail");
+ if (Moment::is_smob (lf)
+ && *Moment::unsmob (lf) == *where)
+ warn = false;
+ else
+ tr->set_property ("barCheckLastFail", mp);
+ }