From 7e85379f54292595afe296e5f0be240f6c8f7835 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Wed, 26 Feb 2014 02:08:53 +0100 Subject: Made constructors of tools use initializer lists. (bzr r13060) --- src/ui/tools/freehand-base.cpp | 56 +++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 31 deletions(-) (limited to 'src/ui/tools/freehand-base.cpp') diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp index 1e0e6b3b6..2fb4a3481 100644 --- a/src/ui/tools/freehand-base.cpp +++ b/src/ui/tools/freehand-base.cpp @@ -70,37 +70,31 @@ static void spdc_flush_white(FreehandBase *dc, SPCurve *gc); static void spdc_reset_white(FreehandBase *dc); static void spdc_free_colors(FreehandBase *dc); -FreehandBase::FreehandBase() : ToolBase() { - this->selection = 0; - this->grab = 0; - this->anchor_statusbar = false; - - this->attach = FALSE; - - this->red_color = 0xff00007f; - this->blue_color = 0x0000ff7f; - this->green_color = 0x00ff007f; - this->red_curve_is_valid = false; - - this->red_bpath = NULL; - this->red_curve = NULL; - - this->blue_bpath = NULL; - this->blue_curve = NULL; - - this->green_bpaths = NULL; - this->green_curve = NULL; - this->green_anchor = NULL; - this->green_closed = false; - - this->white_item = NULL; - this->white_curves = NULL; - this->white_anchors = NULL; - - this->sa = NULL; - this->ea = NULL; - - this->waiting_LPE_type = Inkscape::LivePathEffect::INVALID_LPE; +FreehandBase::FreehandBase(gchar const *const *cursor_shape, gint hot_x, gint hot_y) + : ToolBase(cursor_shape, hot_x, hot_y) + , selection(NULL) + , grab(NULL) + , attach(false) + , red_color(0xff00007f) + , blue_color(0x0000ff7f) + , green_color(0x00ff007f) + , red_bpath(NULL) + , red_curve(NULL) + , blue_bpath(NULL) + , blue_curve(NULL) + , green_bpaths(NULL) + , green_curve(NULL) + , green_anchor(NULL) + , green_closed(false) + , white_item(NULL) + , white_curves(NULL) + , white_anchors(NULL) + , sa(NULL) + , ea(NULL) + , waiting_LPE_type(Inkscape::LivePathEffect::INVALID_LPE) + , red_curve_is_valid(false) + , anchor_statusbar(false) +{ } FreehandBase::~FreehandBase() { -- cgit v1.2.3