From: David Kastrup Date: Mon, 20 Jul 2015 13:03:55 +0000 (+0200) Subject: Issue 4512: Remove redundant occurences of this-> X-Git-Tag: release/2.19.25-1~43 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7c44f8bece4865eb0eb26b0490a4a9a04499a76b;p=lilypond.git Issue 4512: Remove redundant occurences of this-> --- diff --git a/lily/audio-element.cc b/lily/audio-element.cc index d8244d1800..87ed7fcb46 100644 --- a/lily/audio-element.cc +++ b/lily/audio-element.cc @@ -31,5 +31,5 @@ Audio_element::~Audio_element () char const * Audio_element::name () const { - return this->class_name (); + return class_name (); } diff --git a/lily/context.cc b/lily/context.cc index 192cdaa3ee..7e3c646a6f 100644 --- a/lily/context.cc +++ b/lily/context.cc @@ -70,7 +70,7 @@ Context::add_context (Context *child) scm_cons (child->self_scm (), SCM_EOL)); child->daddy_context_ = this; - this->events_below_->register_as_listener (child->events_below_); + events_below_->register_as_listener (child->events_below_); } Context::Context () @@ -315,7 +315,7 @@ Context::create_context_from_event (SCM sev) ly_symbol2scm ("UnsetProperty")); new_context->events_below_->register_as_listener (new_context->event_source_); - this->add_context (new_context); + add_context (new_context); new_context->unprotect (); @@ -414,7 +414,7 @@ Context::get_default_interpreter (const string &context_id) if (!t) { warning (_f ("cannot find or create: `%s'", name.c_str ())); - t = unsmob (this->definition_); + t = unsmob (definition_); } if (scm_is_symbol (t->get_default_child (SCM_EOL))) { @@ -572,8 +572,8 @@ Context::remove_context (SCM) void Context::disconnect_from_parent () { - daddy_context_->events_below_->unregister_as_listener (this->events_below_); - daddy_context_->context_list_ = scm_delq_x (this->self_scm (), daddy_context_->context_list_); + daddy_context_->events_below_->unregister_as_listener (events_below_); + daddy_context_->context_list_ = scm_delq_x (self_scm (), daddy_context_->context_list_); daddy_context_ = 0; } diff --git a/lily/grob.cc b/lily/grob.cc index e43c71186c..d5dcf6794d 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -489,7 +489,7 @@ Grob::extent (Grob *refp, Axis a) const if(!isinf (offset)) real_ext.translate(offset); else - this->warning(_f ("ignored infinite %s-offset", + warning(_f ("ignored infinite %s-offset", a == X_AXIS ? "X" : "Y")); return real_ext; @@ -765,7 +765,7 @@ Grob::name () const SCM meta = get_property ("meta"); SCM nm = scm_assq (ly_symbol2scm ("name"), meta); nm = (scm_is_pair (nm)) ? scm_cdr (nm) : SCM_EOL; - return scm_is_symbol (nm) ? ly_symbol2string (nm) : this->class_name (); + return scm_is_symbol (nm) ? ly_symbol2string (nm) : class_name (); } ADD_INTERFACE (Grob, diff --git a/lily/include/music-iterator.hh b/lily/include/music-iterator.hh index 214079d23a..810d230aac 100644 --- a/lily/include/music-iterator.hh +++ b/lily/include/music-iterator.hh @@ -43,10 +43,10 @@ ok () -- events left ? pending_mom () -- time tag of the next event to be processed. - PRECONDITION: this->ok () holds. + PRECONDITION: ok () holds. process (M) -- process all at M (Precondition: no events exist - before M, this->ok () holds). Side-effects: + before M, ok () holds). Side-effects: * This removes all events at M from the pending queue. diff --git a/lily/lexer.ll b/lily/lexer.ll index b8faf78e31..bfd2449e6b 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -188,7 +188,7 @@ BOM_UTF8 \357\273\277 /* Use the trailing context feature. Otherwise, the BOM will not be found if the file starts with an identifier definition. */ {BOM_UTF8}/.* { - if (this->lexloc_->line_number () != 1 || this->lexloc_->column_number () != 0) + if (lexloc_->line_number () != 1 || lexloc_->column_number () != 0) { LexerWarning (_ ("stray UTF-8 BOM encountered").c_str ()); // exit (1); @@ -244,7 +244,7 @@ BOM_UTF8 \357\273\277 s = s.substr (0, s.rfind ('\"')); yy_pop_state (); - this->here_input().get_source_file ()->name_ = s; + here_input().get_source_file ()->name_ = s; message (_f ("Renaming input to: `%s'", s.c_str ())); progress_indication ("\n"); scm_module_define (scm_car (scopes_), @@ -258,7 +258,7 @@ BOM_UTF8 \357\273\277 sscanf (YYText (), "%d", &i); yy_pop_state (); - this->here_input ().get_source_file ()->set_line (here_input ().start (), i); + here_input ().get_source_file ()->set_line (here_input ().start (), i); } {ANY_CHAR} { diff --git a/lily/midi-item.cc b/lily/midi-item.cc index a08c60b89a..33dd9f11bd 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -426,5 +426,5 @@ Midi_control_function_value_change::to_string () const char const * Midi_item::name () const { - return this->class_name (); + return class_name (); } diff --git a/lily/prob.cc b/lily/prob.cc index d4ea432f03..938f106861 100644 --- a/lily/prob.cc +++ b/lily/prob.cc @@ -192,5 +192,5 @@ Prob::name () const if (scm_is_symbol (nm)) return ly_symbol2string (nm); else - return this->class_name (); + return class_name (); } diff --git a/lily/spanner.cc b/lily/spanner.cc index 087331ab9f..3f3d17fb27 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -210,7 +210,7 @@ Spanner::set_bound (Direction d, Grob *s) original parent for alignment. This happens e.g. for MultiMeasureRestNumbers and PercentRepeatCounters. */ - if (!dynamic_cast (this->get_parent (X_AXIS))) + if (!dynamic_cast (get_parent (X_AXIS))) set_parent (i, X_AXIS); /* diff --git a/lily/system.cc b/lily/system.cc index 528135ad60..91e3f08181 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -181,7 +181,7 @@ System::do_break_substitution_and_fixup_refpoints () handle_broken_dependencies (); - /* Because the this->get_property (all-elements) contains items in 3 + /* Because the get_property (all-elements) contains items in 3 versions, handle_broken_dependencies () will leave duplicated items in all-elements. Strictly speaking this is harmless, but it leads to duplicated symbols in the output. uniq makes sure @@ -550,7 +550,7 @@ System::post_processing () vector all_elts_sorted (all_elements_->array ()); uniquify (all_elts_sorted); - this->get_stencil (); + get_stencil (); for (vsize i = all_elts_sorted.size (); i--;) { Grob *g = all_elts_sorted[i]; @@ -637,14 +637,14 @@ System::get_paper_system () } } - Grob *left_bound = this->get_bound (LEFT); + Grob *left_bound = get_bound (LEFT); SCM prop_init = left_bound->get_property ("line-break-system-details"); Prob *pl = make_paper_system (prop_init); paper_system_set_stencil (pl, sys_stencil); /* information that the page breaker might need */ - Grob *right_bound = this->get_bound (RIGHT); - pl->set_property ("vertical-skylines", this->get_property ("vertical-skylines")); + Grob *right_bound = get_bound (RIGHT); + pl->set_property ("vertical-skylines", get_property ("vertical-skylines")); pl->set_property ("page-break-permission", right_bound->get_property ("page-break-permission")); pl->set_property ("page-turn-permission", right_bound->get_property ("page-turn-permission")); pl->set_property ("page-break-penalty", right_bound->get_property ("page-break-penalty")); @@ -665,7 +665,7 @@ System::get_paper_system () } pl->set_property ("staff-refpoint-extent", ly_interval2scm (staff_refpoints)); - pl->set_property ("system-grob", this->self_scm ()); + pl->set_property ("system-grob", self_scm ()); return pl->unprotect (); } diff --git a/lily/tie-configuration.cc b/lily/tie-configuration.cc index 7628753872..19a2c68f72 100644 --- a/lily/tie-configuration.cc +++ b/lily/tie-configuration.cc @@ -170,7 +170,7 @@ Ties_configuration::complete_tie_card (vsize i) const string s; s += to_string ("%d (%.2f) %c: ", (*this)[i].position_, (*this)[i].delta_y_, ((*this)[i].dir_ == UP ? 'u' : 'd')) - + (*this)[i].card () + (*this).tie_card (i); + + (*this)[i].card () + tie_card (i); /* this is a little awkward, but we must decide where to put