Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(19)

Unified Diff: lily/system.cc

Issue 341320043: Issue 5335: Use covariant return types on virtual Grob::clone() (Closed)
Patch Set: fix style Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lily/spanner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lily/system.cc
diff --git a/lily/system.cc b/lily/system.cc
index 11533824888b6d129559da4e0856adbcc13fd4c4..6e1d7cd06bc32d9e1d26bc7fb4db210f915dc8b1 100644
--- a/lily/system.cc
+++ b/lily/system.cc
@@ -68,12 +68,6 @@ System::init_elements ()
set_object ("all-elements", scm_arr);
}
-Grob *
-System::clone () const
-{
- return new System (*this);
-}
-
int
System::element_count () const
{
@@ -435,7 +429,7 @@ System::break_into_pieces (vector<Column_x_positions> const &breaking)
{
for (vsize i = 0; i < breaking.size (); i++)
{
- System *system = dynamic_cast<System *> (clone ());
+ System *system = clone ();
system->rank_ = broken_intos_.size ();
vector<Grob *> c (breaking[i].cols_);
« no previous file with comments | « lily/spanner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b