Fix initialization order of members

This commit is contained in:
David Capello 2015-01-21 11:35:35 -03:00
parent eae57b865e
commit 1b541e1a24
2 changed files with 5 additions and 5 deletions

View File

@ -46,13 +46,13 @@ namespace cmd {
}
private:
ObjectId m_oldImageId;
ObjectId m_newImageId;
// Reference used only to keep the copy of the new image from the
// ReplaceImage() ctor until the ReplaceImage::onExecute() call.
// Then the reference is not used anymore.
ImageRef m_newImage;
ObjectId m_oldImageId;
ObjectId m_newImageId;
ImageRef m_copy;
};

View File

@ -61,10 +61,10 @@ public:
, m_doc(editor->document())
, m_sprite(editor->sprite())
, m_pal(m_sprite->palette(editor->frame()))
, m_zoom(editor->zoom())
, m_index_bg_color(-1)
, m_doublebuf(Image::create(IMAGE_RGB, ui::display_w(), ui::display_h()))
, m_doublesur(she::instance()->createRgbaSurface(ui::display_w(), ui::display_h()))
, m_zoom(editor->zoom()) {
, m_doublesur(she::instance()->createRgbaSurface(ui::display_w(), ui::display_h())) {
// Do not use DocumentWriter (do not lock the document) because we
// will call other sub-commands (e.g. previous frame, next frame,
// etc.).