summaryrefslogtreecommitdiffstats
path: root/src/common-context.cpp
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2013-10-13 15:24:57 +0000
committerKris <Kris.De.Gussem@hotmail.com>2013-10-13 15:24:57 +0000
commitd3f86d34d0d92505a798f8c9b83ca12dfcbf50ab (patch)
tree69ab725c5c6a24ed10a538e5ad0551d4d86dc530 /src/common-context.cpp
parentUnits: stop newing Unit objects. pass around pointers to "undeletable" Unit o... (diff)
downloadinkscape-d3f86d34d0d92505a798f8c9b83ca12dfcbf50ab.tar.gz
inkscape-d3f86d34d0d92505a798f8c9b83ca12dfcbf50ab.zip
cppcheck
(bzr r12680)
Diffstat (limited to 'src/common-context.cpp')
-rw-r--r--src/common-context.cpp79
1 files changed, 35 insertions, 44 deletions
diff --git a/src/common-context.cpp b/src/common-context.cpp
index fb984cbf1..2155f9739 100644
--- a/src/common-context.cpp
+++ b/src/common-context.cpp
@@ -19,50 +19,41 @@
#define DRAG_DEFAULT 1.0
#define DRAG_MAX 1.0
-SPCommonContext::SPCommonContext() : SPEventContext() {
- this->tremor = 0;
- this->usetilt = 0;
- this->is_drawing = false;
- this->xtilt = 0;
- this->ytilt = 0;
- this->usepressure = 0;
-
-// ctx->cursor_shape = cursor_eraser_xpm;
-// ctx->hot_x = 4;
-// ctx->hot_y = 4;
-
- this->accumulated = 0;
- this->segments = 0;
- this->currentcurve = 0;
- this->currentshape = 0;
- this->npoints = 0;
- this->cal1 = 0;
- this->cal2 = 0;
- this->repr = 0;
-
- /* Common values */
- this->cur = Geom::Point(0,0);
- this->last = Geom::Point(0,0);
- this->vel = Geom::Point(0,0);
- this->vel_max = 0;
- this->acc = Geom::Point(0,0);
- this->ang = Geom::Point(0,0);
- this->del = Geom::Point(0,0);
-
- /* attributes */
- this->dragging = FALSE;
-
- this->mass = 0.3;
- this->drag = DRAG_DEFAULT;
- this->angle = 30.0;
- this->width = 0.2;
- this->pressure = DEFAULT_PRESSURE;
-
- this->vel_thin = 0.1;
- this->flatness = 0.9;
- this->cap_rounding = 0.0;
-
- this->abs_width = false;
+SPCommonContext::SPCommonContext() :
+ SPEventContext(),
+ accumulated(NULL),
+ segments(NULL),
+ currentshape(NULL),
+ currentcurve(NULL),
+ cal1(NULL),
+ cal2(NULL),
+ point1(),
+ point2(),
+ repr(NULL),
+ cur(0,0),
+ vel(0,0),
+ vel_max(0),
+ acc(0,0),
+ ang(0,0),
+ last(0,0),
+ del(0,0),
+ pressure(DEFAULT_PRESSURE),
+ xtilt(0),
+ ytilt(0),
+ dragging(FALSE),
+ usepressure(FALSE),
+ usetilt(FALSE),
+ mass(0.3),
+ drag(DRAG_DEFAULT),
+ angle(30.0),
+ width(0.2),
+ vel_thin(0.1),
+ flatness(0.9),
+ tremor(0),
+ cap_rounding(0),
+ is_drawing(false),
+ abs_width(false)
+{
}
SPCommonContext::~SPCommonContext() {