diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2012-01-17 22:30:48 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2012-01-17 22:30:48 +0000 |
| commit | d97dcb5d03fa3e063c597788fa7f2c766ae5916e (patch) | |
| tree | 471f294f631eca82850a50a6f281b71cc26f195b /src/sp-lpe-item.cpp | |
| parent | documentation (diff) | |
| download | inkscape-d97dcb5d03fa3e063c597788fa7f2c766ae5916e.tar.gz inkscape-d97dcb5d03fa3e063c597788fa7f2c766ae5916e.zip | |
add underscores to some member variables.
add some const stuff
(bzr r10900)
Diffstat (limited to 'src/sp-lpe-item.cpp')
| -rw-r--r-- | src/sp-lpe-item.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index d0c548a6a..33b7dd4aa 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -594,14 +594,14 @@ void sp_lpe_item_up_current_path_effect(SPLPEItem *lpeitem) } /** used for shapes so they can see if they should also disable shape calculation and read from d= */ -bool sp_lpe_item_has_broken_path_effect(SPLPEItem *lpeitem) +bool sp_lpe_item_has_broken_path_effect(SPLPEItem const *lpeitem) { if (lpeitem->path_effect_list->empty()) return false; // go through the list; if some are unknown or invalid, return true - PathEffectList effect_list = sp_lpe_item_get_effect_list(lpeitem); - for (PathEffectList::iterator it = effect_list.begin(); it != effect_list.end(); ++it) + PathEffectList const effect_list = sp_lpe_item_get_effect_list(lpeitem); + for (PathEffectList::const_iterator it = effect_list.begin(); it != effect_list.end(); ++it) { LivePathEffectObject *lpeobj = (*it)->lpeobject; if (!lpeobj || !lpeobj->get_lpe()) @@ -612,14 +612,14 @@ bool sp_lpe_item_has_broken_path_effect(SPLPEItem *lpeitem) } -bool sp_lpe_item_has_path_effect(SPLPEItem *lpeitem) +bool sp_lpe_item_has_path_effect(SPLPEItem const *lpeitem) { if (lpeitem->path_effect_list->empty()) return false; // go through the list; if some are unknown or invalid, we are not an LPE item! - PathEffectList effect_list = sp_lpe_item_get_effect_list(lpeitem); - for (PathEffectList::iterator it = effect_list.begin(); it != effect_list.end(); ++it) + PathEffectList const effect_list = sp_lpe_item_get_effect_list(lpeitem); + for (PathEffectList::const_iterator it = effect_list.begin(); it != effect_list.end(); ++it) { LivePathEffectObject *lpeobj = (*it)->lpeobject; if (!lpeobj || !lpeobj->get_lpe()) @@ -629,9 +629,9 @@ bool sp_lpe_item_has_path_effect(SPLPEItem *lpeitem) return true; } -bool sp_lpe_item_has_path_effect_recursive(SPLPEItem *lpeitem) +bool sp_lpe_item_has_path_effect_recursive(SPLPEItem const *lpeitem) { - SPObject *parent = lpeitem->parent; + SPObject const *parent = lpeitem->parent; if (parent && SP_IS_LPE_ITEM(parent)) { return sp_lpe_item_has_path_effect(lpeitem) || sp_lpe_item_has_path_effect_recursive(SP_LPE_ITEM(parent)); } @@ -737,7 +737,12 @@ static std::string hreflist_write_svg(HRefList const & list) // Return a copy of the effect list PathEffectList sp_lpe_item_get_effect_list(SPLPEItem *lpeitem) { - return *lpeitem->path_effect_list; + return *(lpeitem->path_effect_list); +} +// Return a copy of the effect list +PathEffectList const sp_lpe_item_get_effect_list(SPLPEItem const *lpeitem) +{ + return *(lpeitem->path_effect_list); } Inkscape::LivePathEffect::LPEObjectReference* sp_lpe_item_get_current_lpereference(SPLPEItem *lpeitem) |
