Georg Baum wrote:
Am Dienstag, 19. Dezember 2006 15:27 schrieb [EMAIL PROTECTED]:

--- lyx-devel/trunk/src/paragraph.C (original)
+++ lyx-devel/trunk/src/paragraph.C Tue Dec 19 15:27:38 2006
@@ -69,6 +69,88 @@
 using std::ostringstream;
+ParagraphMetrics::ParagraphMetrics()
+{
+}
+
+
+ParagraphMetrics::ParagraphMetrics(ParagraphMetrics const & pm)
+       : dim_(pm.dim_), rows_(pm.rows_), rowSignature_(pm.rowSignature_)

The initialization order is wrong.

+{
+}
+
+
+ParagraphMetrics & ParagraphMetrics::operator=(ParagraphMetrics const &
pm)
+{
+       rows_ = pm.rows_;
+       dim_ = pm.dim_;
+       rowSignature_ = pm.rowSignature_;
+       return *this;
+}

Why do we need these two constructors and the assignment operator? Why can't we let the compiler generate them for us like in the attached patch?

My patch was just moving some code. I did not want to change it at this time because of no time to test it. But you are probably right in both questions. If it compiles and works, just apply, it seems safe.

Abdel.

Reply via email to