Peter Kümmel wrote:
Abdelrazak Younes wrote:
Georg Baum wrote:
This should be fixed:
Interesting (I don't have the warning with MSVC). I'll see what I can do.


The declaration order is different to the order of the initialization.
MSVC did not warn about this. To fix it we must only change the order
of the initialization/initialization.

Yep. That's what I've done:

Fix (hopefully) gcc warning about initialization order in constructor.

Modified:
    lyx-devel/trunk/src/frontends/LyXView.C
    lyx-devel/trunk/src/frontends/WorkArea.C

Modified: lyx-devel/trunk/src/frontends/LyXView.C
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/LyXView.C?rev=15553
==============================================================================
--- lyx-devel/trunk/src/frontends/LyXView.C (original)
+++ lyx-devel/trunk/src/frontends/LyXView.C Thu Oct 26 10:01:48 2006
@@ -68,11 +68,11 @@


 LyXView::LyXView(int id)
-       : id_(id), work_area_(0),
+       : work_area_(0),
          toolbars_(new Toolbars(*this)),
          autosave_timeout_(new Timeout(5000)),
          dialogs_(new Dialogs(*this)),
-         controlcommand_(new ControlCommandBuffer(*this))
+         controlcommand_(new ControlCommandBuffer(*this)), id_(id)
 {
        // Start autosave timer
        if (lyxrc.autosave) {

Modified: lyx-devel/trunk/src/frontends/WorkArea.C
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/WorkArea.C?rev=15553
==============================================================================
--- lyx-devel/trunk/src/frontends/WorkArea.C (original)
+++ lyx-devel/trunk/src/frontends/WorkArea.C Thu Oct 26 10:01:48 2006
@@ -71,8 +71,8 @@
 namespace frontend {

 WorkArea::WorkArea(int id, LyXView & lyx_view)
-       : id_(id), buffer_view_(0), lyx_view_(lyx_view), greyed_out_(true),
-         cursor_visible_(false), cursor_timeout_(400)
+       : buffer_view_(0), lyx_view_(lyx_view), greyed_out_(true),
+         cursor_visible_(false), cursor_timeout_(400), id_(id)
 {
        // Start loading the pixmap as soon as possible
        //if (lyxrc.show_banner) {

Reply via email to