From e1db2612978dc4bca7d83ab3a4208c7523c67365 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Fri, 9 May 2008 09:37:08 +0000 Subject: - try to use more forward declarations for less dependencies on display/curve.h - change _bpath to private member of SPCurve, obtain and set with get_bpath and set_bpath. - added const methods, so protect changes to _bpath in SPCurve (bzr r5636) --- src/live_effects/effect.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 2cd88fd8b..f699248e4 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -164,18 +164,13 @@ Effect::doBeforeEffect (SPLPEItem */*lpeitem*/) void Effect::doEffect (SPCurve * curve) { - NArtBpath *new_bpath = doEffect_nartbpath(SP_CURVE_BPATH(curve)); + NArtBpath *new_bpath = doEffect_nartbpath(curve->get_bpath()); - if (new_bpath && new_bpath != SP_CURVE_BPATH(curve)) { // FIXME, add function to SPCurve to change bpath? or a copy function? - if (curve->_bpath) { - g_free(curve->_bpath); //delete old bpath - } - curve->_bpath = new_bpath; - } + curve->set_bpath(new_bpath); } NArtBpath * -Effect::doEffect_nartbpath (NArtBpath * path_in) +Effect::doEffect_nartbpath (NArtBpath const * path_in) { try { std::vector orig_pathv = BPath_to_2GeomPath(path_in); -- cgit v1.2.3