diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-06-26 15:02:43 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-06-26 15:02:43 +0000 |
| commit | 7ba326595d1be4d49e6ccc8f5b66bf41f37dc5a1 (patch) | |
| tree | b46195664be7eb2c9e1fbf3b20856b55c7ecd963 | |
| parent | use pathv_matrix_point_bbox_wind_distance instead of nr_path_matrix_point_bbo... (diff) | |
| download | inkscape-7ba326595d1be4d49e6ccc8f5b66bf41f37dc5a1.tar.gz inkscape-7ba326595d1be4d49e6ccc8f5b66bf41f37dc5a1.zip | |
add const to references that are not written to
(bzr r6069)
| -rw-r--r-- | src/helper/geom.cpp | 13 | ||||
| -rw-r--r-- | src/helper/geom.h | 4 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp index 9916a6333..190a52b5d 100644 --- a/src/helper/geom.cpp +++ b/src/helper/geom.cpp @@ -192,7 +192,7 @@ bounds_exact_transformed(Geom::PathVector const & pv, Geom::Matrix const & t) static void
-geom_line_wind_distance (Geom::Coord x0, Geom::Coord y0, Geom::Coord x1, Geom::Coord y1, Geom::Point &pt, int *wind, Geom::Coord *best)
+geom_line_wind_distance (Geom::Coord x0, Geom::Coord y0, Geom::Coord x1, Geom::Coord y1, Geom::Point const &pt, int *wind, Geom::Coord *best)
{
Geom::Coord Ax, Ay, Bx, By, Dx, Dy, s;
Geom::Coord dist2;
@@ -252,7 +252,7 @@ geom_cubic_bbox_wind_distance (Geom::Coord x000, Geom::Coord y000, Geom::Coord x001, Geom::Coord y001,
Geom::Coord x011, Geom::Coord y011,
Geom::Coord x111, Geom::Coord y111,
- Geom::Point &pt,
+ Geom::Point const &pt,
Geom::Rect *bbox, int *wind, Geom::Coord *best,
Geom::Coord tolerance)
{
@@ -343,7 +343,7 @@ geom_cubic_bbox_wind_distance (Geom::Coord x000, Geom::Coord y000, static void
geom_curve_bbox_wind_distance(Geom::Curve const * c, Geom::Matrix const &m,
- Geom::Point &pt,
+ Geom::Point const &pt,
Geom::Rect *bbox, int *wind, Geom::Coord *dist,
Geom::Coord tolerance, Geom::Rect *viewbox,
Geom::Point &p0) // pass p0 through as it represents the last endpoint added (the finalPoint of last curve)
@@ -404,7 +404,7 @@ geom_curve_bbox_wind_distance(Geom::Curve const * c, Geom::Matrix const &m, Returns bounding box in *bbox if bbox!=NULL.
*/
void
-pathv_matrix_point_bbox_wind_distance (Geom::PathVector const & pathv, Geom::Matrix const &m, Geom::Point &pt,
+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)
{
@@ -448,11 +448,10 @@ pathv_matrix_point_bbox_wind_distance (Geom::PathVector const & pathv, Geom::Mat // temporary wrapper
void
-pathv_matrix_point_bbox_wind_distance (Geom::PathVector const & pathv, NR::Matrix const &m, NR::Point &pt,
+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)
{
- Geom::Point _pt(to_2geom(pt));
Geom::Rect _bbox;
if (bbox)
_bbox = to_2geom(*bbox);
@@ -463,7 +462,7 @@ pathv_matrix_point_bbox_wind_distance (Geom::PathVector const & pathv, NR::Matri if (viewbox)
_viewbox = to_2geom(*viewbox);
- pathv_matrix_point_bbox_wind_distance( pathv, to_2geom(m), _pt,
+ pathv_matrix_point_bbox_wind_distance( pathv, to_2geom(m), to_2geom(pt),
bbox ? &_bbox : NULL,
wind,
dist ? &_dist : NULL,
diff --git a/src/helper/geom.h b/src/helper/geom.h index 1096c6ba1..95e735f6c 100644 --- a/src/helper/geom.h +++ b/src/helper/geom.h @@ -19,10 +19,10 @@ Geom::Rect bounds_fast_transformed(Geom::PathVector const & pv, Geom::Matrix const & t);
Geom::Rect bounds_exact_transformed(Geom::PathVector const & pv, Geom::Matrix const & t);
-void pathv_matrix_point_bbox_wind_distance ( Geom::PathVector const & pathv, NR::Matrix const &m, NR::Point &pt,
+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));
-void pathv_matrix_point_bbox_wind_distance ( Geom::PathVector const & pathv, Geom::Matrix const &m, Geom::Point &pt,
+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);
|
