summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2014-01-11 11:46:14 +0000
committerKris <Kris.De.Gussem@hotmail.com>2014-01-11 11:46:14 +0000
commit8c982dba53fde33ed4ac47645049938259894a8e (patch)
tree47086c44decdf027c46db42563053f3c44e11c37 /src/document.cpp
parentgtkmmification (seems there is more margin in desktop-widget.cpp) (diff)
downloadinkscape-8c982dba53fde33ed4ac47645049938259894a8e.tar.gz
inkscape-8c982dba53fde33ed4ac47645049938259894a8e.zip
pass class variables by reference for performance
(bzr r12916)
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/document.cpp b/src/document.cpp
index e6166ee82..e56adee68 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -1173,7 +1173,7 @@ static bool item_is_in_group(SPItem *item, SPGroup *group)
return inGroup;
}
-SPItem *SPDocument::getItemFromListAtPointBottom(unsigned int dkey, SPGroup *group, GSList const *list,Geom::Point const p, bool take_insensitive)
+SPItem *SPDocument::getItemFromListAtPointBottom(unsigned int dkey, SPGroup *group, GSList const *list,Geom::Point const &p, bool take_insensitive)
{
g_return_val_if_fail(group, NULL);
SPItem *bottomMost = 0;
@@ -1209,7 +1209,7 @@ items. If upto != NULL, then if item upto is encountered (at any level), stops s
upwards in z-order and returns what it has found so far (i.e. the found item is
guaranteed to be lower than upto).
*/
-static SPItem *find_item_at_point(unsigned int dkey, SPGroup *group, Geom::Point const p, gboolean into_groups, bool take_insensitive = false, SPItem *upto = NULL)
+static SPItem *find_item_at_point(unsigned int dkey, SPGroup *group, Geom::Point const &p, gboolean into_groups, bool take_insensitive = false, SPItem *upto = NULL)
{
SPItem *seen = NULL;
SPItem *newseen = NULL;
@@ -1254,7 +1254,7 @@ static SPItem *find_item_at_point(unsigned int dkey, SPGroup *group, Geom::Point
Returns the topmost non-layer group from the descendants of group which is at point
p, or NULL if none. Recurses into layers but not into groups.
*/
-static SPItem *find_group_at_point(unsigned int dkey, SPGroup *group, Geom::Point const p)
+static SPItem *find_group_at_point(unsigned int dkey, SPGroup *group, Geom::Point const &p)
{
SPItem *seen = NULL;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
@@ -1334,7 +1334,7 @@ GSList *SPDocument::getItemsAtPoints(unsigned const key, std::vector<Geom::Point
return items;
}
-SPItem *SPDocument::getItemAtPoint( unsigned const key, Geom::Point const p,
+SPItem *SPDocument::getItemAtPoint( unsigned const key, Geom::Point const &p,
gboolean const into_groups, SPItem *upto) const
{
g_return_val_if_fail(this->priv != NULL, NULL);
@@ -1342,7 +1342,7 @@ SPItem *SPDocument::getItemAtPoint( unsigned const key, Geom::Point const p,
return find_item_at_point(key, SP_GROUP(this->root), p, into_groups, false, upto);
}
-SPItem *SPDocument::getGroupAtPoint(unsigned int key, Geom::Point const p) const
+SPItem *SPDocument::getGroupAtPoint(unsigned int key, Geom::Point const &p) const
{
g_return_val_if_fail(this->priv != NULL, NULL);