summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-06-26 15:06:10 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-06-26 15:06:10 +0000
commitc1f17a0ddb3cab4020e8a4b6e29003092977f987 (patch)
tree0ecc069f78d277b50aa3aa4a6b496d427a68ec6c /src
parentuse all 2geom typed pathv_matrix_point_bbox_wind_distance (diff)
downloadinkscape-c1f17a0ddb3cab4020e8a4b6e29003092977f987.tar.gz
inkscape-c1f17a0ddb3cab4020e8a4b6e29003092977f987.zip
add const to pointers that are not written to
(bzr r6071)
Diffstat (limited to 'src')
-rw-r--r--src/helper/geom.cpp8
-rw-r--r--src/helper/geom.h4
2 files changed, 5 insertions, 7 deletions
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<Geom::LineSegment const *>(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