From: cilix42 Date: Mon, 20 Aug 2007 12:53:40 +0000 (+0000) Subject: Eliminate a number of compile warnings X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a320e0fbc2a3815248a5b77eafea91c83c3c3c11;p=inkscape.git Eliminate a number of compile warnings --- diff --git a/src/box3d.cpp b/src/box3d.cpp index b0195cdb8..dcbe5b531 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -439,8 +439,6 @@ bool sp_3dbox_recompute_z_orders (SP3DBox *box) { guint new_z_orders[6]; - Box3D::Perspective3D *persp = SP_OBJECT_DOCUMENT (G_OBJECT (box))->get_persp_of_box (box); - // TODO: Determine the front corner depending on the distance from VPs and/or the user presets guint front_corner = sp_3dbox_get_front_corner_id (box); @@ -448,7 +446,7 @@ bool sp_3dbox_recompute_z_orders (SP3DBox *box) gdouble dir_3x = sp_3dbox_corner_angle_to_VP (box, Box3D::X, front_corner ^ Box3D::Y); gdouble dir_1y = sp_3dbox_corner_angle_to_VP (box, Box3D::Y, front_corner); - gdouble dir_0y = sp_3dbox_corner_angle_to_VP (box, Box3D::Y, front_corner ^ Box3D::X); + //gdouble dir_0y = sp_3dbox_corner_angle_to_VP (box, Box3D::Y, front_corner ^ Box3D::X); gdouble dir_1z = sp_3dbox_corner_angle_to_VP (box, Box3D::Z, front_corner); gdouble dir_3z = sp_3dbox_corner_angle_to_VP (box, Box3D::Z, front_corner ^ Box3D::Y); @@ -499,8 +497,6 @@ bool sp_3dbox_recompute_z_orders (SP3DBox *box) void sp_3dbox_set_z_orders (SP3DBox *box) { - GSList *items = sp_item_group_item_list(SP_GROUP(box)); - // For efficiency reasons, we only set the new z-orders if something really changed if (sp_3dbox_recompute_z_orders (box)) { box->faces[box->z_orders[0]]->lower_to_bottom (); @@ -822,7 +818,6 @@ void sp_3dbox_recompute_XY_corners_from_new_center (SP3DBox *box, NR::Point cons Box3D::PerspectiveLine aux_line4 (new_center, Box3D::Z, persp); NR::Point M2 = aux_line4.meet (aux_line3); - Box3D::VanishingPoint *vp_y = persp->get_vanishing_point (Box3D::Y); std::pair other_new_midpts = sp_3dbox_new_midpoints (persp, Box3D::Y, M1, M2, C1, D1); NR::Point C2 (other_new_midpts.first); NR::Point D2 (other_new_midpts.second); @@ -890,6 +885,9 @@ void sp_3dbox_corners_for_perspective_lines (const SP3DBox * box, Box3D::Axis ax corner3 = sp_3dbox_get_corner_along_edge (box, 0 ^ switch_axis, axis, Box3D::REAR); corner4 = sp_3dbox_get_corner_along_edge (box, 2 ^ switch_axis, axis, Box3D::REAR); break; + default: + // do nothing + break; } } diff --git a/src/line-geometry.h b/src/line-geometry.h index cc0c9aaf4..72e0ae794 100644 --- a/src/line-geometry.h +++ b/src/line-geometry.h @@ -28,6 +28,7 @@ class Line { public: Line(NR::Point const &start, NR::Point const &vec, bool is_endpoint = true); Line(Line const &line); + virtual ~Line() {} Line &operator=(Line const &line); virtual NR::Maybe intersect(Line const &line); void set_direction(NR::Point const &dir); // FIXME: Can we avoid this explicit assignment? diff --git a/src/object-edit.cpp b/src/object-edit.cpp index 765f90303..2ebb2a065 100644 --- a/src/object-edit.cpp +++ b/src/object-edit.cpp @@ -545,6 +545,7 @@ static inline Box3D::Axis movement_axis_of_3dbox_corner (guint corner, guint sta case 7: return ((state & GDK_SHIFT_MASK) ? Box3D::XY : Box3D::Z); } + return Box3D::NONE; } /* diff --git a/src/perspective3d.cpp b/src/perspective3d.cpp index c9c56e78d..e2b9fcbc2 100644 --- a/src/perspective3d.cpp +++ b/src/perspective3d.cpp @@ -174,7 +174,7 @@ Perspective3D::set_vanishing_point (Box3D::Axis const dir, VanishingPoint const case Z: (*vp_z) = pt; break; - case NONE: + default: // no vanishing point to set break; } @@ -205,7 +205,7 @@ Perspective3D::set_vanishing_point (Box3D::Axis const dir, gdouble pt_x, gdouble case Z: vp = vp_z; break; - case NONE: + default: // no vanishing point to set return; }