Fix order of members initialization detected by clang

This commit is contained in:
David Capello 2014-08-17 20:38:55 -03:00
parent 5075c1f86f
commit 51ab478f49
16 changed files with 29 additions and 28 deletions

View File

@ -54,8 +54,6 @@ namespace app {
base::UniquePtr<CheckUpdateBackgroundJob> m_bgJob;
bool m_doCheck;
bool m_received;
updater::CheckUpdateResponse m_response;
ui::Timer m_timer;
// Mini-stats
int m_inits;
@ -63,6 +61,9 @@ namespace app {
// True if this is a developer
bool m_isDeveloper;
updater::CheckUpdateResponse m_response;
ui::Timer m_timer;
};
} // namespace app

View File

@ -59,18 +59,18 @@ public:
CanvasSizeWindow(int left, int top, int right, int bottom)
: Window(WithTitleBar, "Canvas Size")
, m_editor(current_editor)
, m_mainBox(app::load_widget<Widget>("canvas_size.xml", "main_box"))
, m_left(app::find_widget<Entry>(m_mainBox, "left"))
, m_right(app::find_widget<Entry>(m_mainBox, "right"))
, m_top(app::find_widget<Entry>(m_mainBox, "top"))
, m_bottom(app::find_widget<Entry>(m_mainBox, "bottom"))
, m_ok(app::find_widget<Button>(m_mainBox, "ok"))
, m_rect(-left, -top,
current_editor->sprite()->width() + left + right,
current_editor->sprite()->height() + top + bottom)
, m_selectBoxState(new SelectBoxState(this, m_rect,
SelectBoxState::PaintRulers |
SelectBoxState::PaintDarkOutside))
, m_mainBox(app::load_widget<Widget>("canvas_size.xml", "main_box"))
, m_left(app::find_widget<Entry>(m_mainBox, "left"))
, m_top(app::find_widget<Entry>(m_mainBox, "top"))
, m_right(app::find_widget<Entry>(m_mainBox, "right"))
, m_bottom(app::find_widget<Entry>(m_mainBox, "bottom"))
, m_ok(app::find_widget<Button>(m_mainBox, "ok"))
{
addChild(m_mainBox);

View File

@ -52,9 +52,9 @@ FilterManagerImpl::FilterManagerImpl(Context* context, Filter* filter)
: m_context(context)
, m_location(context->activeLocation())
, m_filter(filter)
, m_progressDelegate(NULL)
, m_dst(NULL)
, m_preview_mask(NULL)
, m_progressDelegate(NULL)
{
int offset_x, offset_y;

View File

@ -42,8 +42,8 @@ FilterWindow::FilterWindow(const char* title, const char* cfgSection,
, m_cfgSection(cfgSection)
, m_filterMgr(filterMgr)
, m_hbox(JI_HORIZONTAL)
, m_container(JI_VERTICAL)
, m_vbox(JI_VERTICAL)
, m_container(JI_VERTICAL)
, m_okButton("&OK")
, m_cancelButton("&Cancel")
, m_preview(filterMgr)

View File

@ -67,8 +67,8 @@ public:
, m_gridVisible(get_config_bool("Grid", "Visible", false))
, m_gridBounds(get_config_rect("Grid", "Bounds", Rect(0, 0, 16, 16)))
, m_gridColor(get_config_color("Grid", "Color", app::Color::fromRgb(0, 0, 255)))
, m_pixelGridColor(get_config_color("PixelGrid", "Color", app::Color::fromRgb(200, 200, 200)))
, m_pixelGridVisible(get_config_bool("PixelGrid", "Visible", false))
, m_pixelGridColor(get_config_color("PixelGrid", "Color", app::Color::fromRgb(200, 200, 200)))
, m_isLoop(false)
, m_loopBegin(0)
, m_loopEnd(-1)

View File

@ -394,10 +394,10 @@ public:
BlurInkProcessing(ToolLoop* loop) :
m_palette(get_current_palette()),
m_rgbmap(loop->getRgbMap()),
m_area(get_current_palette()),
m_opacity(loop->getOpacity()),
m_tiledMode(loop->getDocumentSettings()->getTiledMode()),
m_srcImage(loop->getSrcImage()) {
m_srcImage(loop->getSrcImage()),
m_area(get_current_palette()) {
}
void processPixel(int x, int y) {

View File

@ -89,9 +89,9 @@ private:
ColorSelector::ColorSelector()
: PopupWindowPin("Color Selector", PopupWindow::kCloseOnClickInOtherWindow)
, m_color(app::Color::fromMask())
, m_vbox(JI_VERTICAL)
, m_topBox(JI_HORIZONTAL)
, m_color(app::Color::fromMask())
, m_colorPalette(false)
, m_indexButton("Index", 1, kButtonWidget)
, m_rgbButton("RGB", 1, kButtonWidget)

View File

@ -103,10 +103,10 @@ public:
, m_sprite(editor->sprite())
, m_layer(editor->layer())
, m_frame(editor->frame())
, m_canceled(false)
, m_settings(m_context->settings())
, m_docSettings(m_settings->getDocumentSettings(m_document))
, m_toolSettings(m_settings->getToolSettings(m_tool))
, m_canceled(false)
, m_button(button)
, m_ink(getInkFromType())
, m_primary_color(color_utils::color_for_layer(primary_color, m_layer))

View File

@ -119,6 +119,9 @@ namespace app {
Tab* m_selected;
int m_scrollX;
// Delegate of notifications
TabsDelegate* m_delegate;
// Variables for animation purposes
ui::Timer m_timer;
int m_begScrollX; // Initial X position of scroll in the animation when you scroll with mouse wheel
@ -132,9 +135,6 @@ namespace app {
class ScrollButton;
ScrollButton* m_button_left;
ScrollButton* m_button_right;
// Delegate of notifications
TabsDelegate* m_delegate;
};
} // namespace app

View File

@ -91,8 +91,8 @@ ToolBar* ToolBar::m_instance = NULL;
ToolBar::ToolBar()
: Widget(kGenericWidget)
, m_tipTimer(300, this)
, m_openedRecently(false)
, m_tipTimer(300, this)
{
m_instance = this;

View File

@ -18,8 +18,8 @@
namespace doc {
Document::Document()
: m_ctx(NULL)
, m_sprites(this)
: m_sprites(this)
, m_ctx(NULL)
{
}

View File

@ -25,14 +25,14 @@
namespace filters {
ConvolutionMatrix::ConvolutionMatrix(int width, int height)
: m_data(width*height, 0)
, m_width(width)
: m_width(width)
, m_height(height)
, m_cx(width/2)
, m_cy(height/2)
, m_div(ConvolutionMatrix::Precision)
, m_bias(0)
, m_defaultTarget(0)
, m_data(width*height, 0)
{
}

View File

@ -56,8 +56,8 @@ namespace quantization {
int r2, int g2, int b2)
: r1(r1), g1(g1), b1(b1)
, r2(r2), g2(g2), b2(b2)
, volume(calculateVolume())
, points(0) { }
, points(0)
, volume(calculateVolume()) { }
// Shrinks each plane of the box to a position where there are
// points in the histogram.

View File

@ -31,8 +31,8 @@ namespace raster {
Stock::Stock(Sprite* sprite, PixelFormat format)
: Object(OBJECT_STOCK)
, m_sprite(sprite)
, m_format(format)
, m_sprite(sprite)
{
// Image with index=0 is always NULL.
m_image.push_back(NULL);

View File

@ -30,10 +30,10 @@ ButtonBase::ButtonBase(const std::string& text,
WidgetType drawType)
: Widget(type)
, m_pressedStatus(false)
, m_handleSelect(true)
, m_behaviorType(behaviorType)
, m_drawType(drawType)
, m_iconInterface(NULL)
, m_handleSelect(true)
{
setAlign(JI_CENTER | JI_MIDDLE);
setText(text);

View File

@ -25,9 +25,9 @@ int ScrollBar::m_whereclick = 0;
ScrollBar::ScrollBar(int align)
: Widget(kViewScrollbarWidget)
, m_barWidth(getTheme()->scrollbar_size)
, m_pos(0)
, m_size(0)
, m_barWidth(getTheme()->scrollbar_size)
{
setAlign(align);
initTheme();