lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Let Skyline's copy constructor use whole-sale copy construction of m


From: dak
Subject: Re: Let Skyline's copy constructor use whole-sale copy construction of members (issue 12747043)
Date: Thu, 15 Aug 2013 19:16:39 +0000

Reviewers: benko.pal,

Message:
On 2013/08/15 19:00:39, benko.pal wrote:
LGTM, but then why not let the compiler generate the copy constructor?

Good point.

Description:
Let Skyline's copy constructor use whole-sale copy construction of
members

Originally connected with issue 3490, now separate.

Please review this at https://codereview.appspot.com/12747043/

Affected files:
  M lily/skyline.cc


Index: lily/skyline.cc
diff --git a/lily/skyline.cc b/lily/skyline.cc
index 5073e69e14b3eaccb805a712e8979be7d9b8856f..77c2443fe836971018c2c131584b3c87da270f6b 100644
--- a/lily/skyline.cc
+++ b/lily/skyline.cc
@@ -457,16 +457,8 @@ Skyline::Skyline ()
   empty_skyline (&buildings_);
 }

-Skyline::Skyline (Skyline const &src)
+Skyline::Skyline (Skyline const &src) : sky_(src.sky_), buildings_(src.buildings_)
 {
-  sky_ = src.sky_;
-
-  /* doesn't a list's copy constructor do this? -- jneem */
-  for (list<Building>::const_iterator i = src.buildings_.begin ();
-       i != src.buildings_.end (); i++)
-    {
-      buildings_.push_back (Building ((*i)));
-    }
 }

 Skyline::Skyline (Direction sky)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]