From: johanengelen Date: Thu, 26 Jun 2008 15:06:10 +0000 (+0000) Subject: add const to pointers that are not written to X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=15fa16aba20400d80a32ef18d2368b420f7bfe56;p=inkscape.git add const to pointers that are not written to --- diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp index 190a52b5d..283e4a3b2 100644 --- a/src/helper/geom.cpp +++ b/src/helper/geom.cpp @@ -345,7 +345,7 @@ static void geom_curve_bbox_wind_distance(Geom::Curve const * c, Geom::Matrix const &m, Geom::Point const &pt, Geom::Rect *bbox, int *wind, Geom::Coord *dist, - Geom::Coord tolerance, Geom::Rect *viewbox, + Geom::Coord tolerance, Geom::Rect const *viewbox, Geom::Point &p0) // pass p0 through as it represents the last endpoint added (the finalPoint of last curve) { if(Geom::LineSegment const *line_segment = dynamic_cast(c)) { // TODO: make it work for HLineSegment too! (use finalPoint) @@ -406,7 +406,7 @@ geom_curve_bbox_wind_distance(Geom::Curve const * c, Geom::Matrix const &m, void pathv_matrix_point_bbox_wind_distance (Geom::PathVector const & pathv, Geom::Matrix const &m, Geom::Point const &pt, Geom::Rect *bbox, int *wind, Geom::Coord *dist, - Geom::Coord tolerance, Geom::Rect *viewbox) + Geom::Coord tolerance, Geom::Rect const *viewbox) { if (pathv.empty()) { if (wind) *wind = 0; @@ -450,7 +450,7 @@ pathv_matrix_point_bbox_wind_distance (Geom::PathVector const & pathv, Geom::Mat void pathv_matrix_point_bbox_wind_distance (Geom::PathVector const & pathv, NR::Matrix const &m, NR::Point const &pt, NR::Rect *bbox, int *wind, NR::Coord *dist, - NR::Coord tolerance, NR::Rect *viewbox) + NR::Coord tolerance, NR::Rect const *viewbox) { Geom::Rect _bbox; if (bbox) @@ -473,8 +473,6 @@ pathv_matrix_point_bbox_wind_distance (Geom::PathVector const & pathv, NR::Matri *bbox = from_2geom(_bbox); if (dist) *dist = _dist; - if (viewbox) - *viewbox = from_2geom(_viewbox); } //################################################################################# diff --git a/src/helper/geom.h b/src/helper/geom.h index 95e735f6c..a271ae3f0 100644 --- a/src/helper/geom.h +++ b/src/helper/geom.h @@ -21,10 +21,10 @@ Geom::Rect bounds_exact_transformed(Geom::PathVector const & pv, Geom::Matrix co void pathv_matrix_point_bbox_wind_distance ( Geom::PathVector const & pathv, NR::Matrix const &m, NR::Point const &pt, NR::Rect *bbox, int *wind, NR::Coord *dist, - NR::Coord tolerance, NR::Rect *viewbox) __attribute__ ((deprecated)); + NR::Coord tolerance, NR::Rect const *viewbox) __attribute__ ((deprecated)); void pathv_matrix_point_bbox_wind_distance ( Geom::PathVector const & pathv, Geom::Matrix const &m, Geom::Point const &pt, Geom::Rect *bbox, int *wind, Geom::Coord *dist, - Geom::Coord tolerance, Geom::Rect *viewbox); + Geom::Coord tolerance, Geom::Rect const *viewbox); #endif // INKSCAPE_HELPER_GEOM_H