diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2013-10-13 15:24:57 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2013-10-13 15:24:57 +0000 |
| commit | d3f86d34d0d92505a798f8c9b83ca12dfcbf50ab (patch) | |
| tree | 69ab725c5c6a24ed10a538e5ad0551d4d86dc530 /src | |
| parent | Units: stop newing Unit objects. pass around pointers to "undeletable" Unit o... (diff) | |
| download | inkscape-d3f86d34d0d92505a798f8c9b83ca12dfcbf50ab.tar.gz inkscape-d3f86d34d0d92505a798f8c9b83ca12dfcbf50ab.zip | |
cppcheck
(bzr r12680)
Diffstat (limited to 'src')
| -rw-r--r-- | src/common-context.cpp | 79 | ||||
| -rw-r--r-- | src/display/cairo-utils.cpp | 3 | ||||
| -rw-r--r-- | src/libavoid/connector.cpp | 6 |
3 files changed, 39 insertions, 49 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() { diff --git a/src/display/cairo-utils.cpp b/src/display/cairo-utils.cpp index 451f0b509..5b358ade7 100644 --- a/src/display/cairo-utils.cpp +++ b/src/display/cairo-utils.cpp @@ -254,7 +254,6 @@ Pixbuf *Pixbuf::create_from_data_uri(gchar const *uri_data) } if ((*data) && data_is_image && data_is_base64) { - GdkPixbuf *buf = NULL; GdkPixbufLoader *loader = gdk_pixbuf_loader_new(); if (!loader) return NULL; @@ -264,7 +263,7 @@ Pixbuf *Pixbuf::create_from_data_uri(gchar const *uri_data) if (gdk_pixbuf_loader_write(loader, decoded, decoded_len, NULL)) { gdk_pixbuf_loader_close(loader, NULL); - buf = gdk_pixbuf_loader_get_pixbuf(loader); + GdkPixbuf *buf = gdk_pixbuf_loader_get_pixbuf(loader); if (buf) { g_object_ref(buf); pixbuf = new Pixbuf(buf); diff --git a/src/libavoid/connector.cpp b/src/libavoid/connector.cpp index 3dbd941a4..cf8cfa11a 100644 --- a/src/libavoid/connector.cpp +++ b/src/libavoid/connector.cpp @@ -286,7 +286,7 @@ void ConnRef::common_updateEndPoint(const unsigned int type, const ConnEnd& conn } VertInf *altered = NULL; - VertInf *partner = NULL; + // VertInf *partner = NULL; bool isShape = false; if (type == (unsigned int) VertID::src) @@ -302,7 +302,7 @@ void ConnRef::common_updateEndPoint(const unsigned int type, const ConnEnd& conn _srcVert->visDirections = connEnd.directions(); altered = _srcVert; - partner = _dstVert; + // partner = _dstVert; } else // if (type == (unsigned int) VertID::tar) { @@ -317,7 +317,7 @@ void ConnRef::common_updateEndPoint(const unsigned int type, const ConnEnd& conn _dstVert->visDirections = connEnd.directions(); altered = _dstVert; - partner = _srcVert; + // partner = _srcVert; } // XXX: Seems to be faster to just remove the edges and recreate |
