summaryrefslogtreecommitdiffstats
path: root/src/filter-chemistry.cpp
diff options
context:
space:
mode:
authorAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-08-09 09:58:51 +0000
committerAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-08-09 09:58:51 +0000
commite5143d65bb57d4ce623e6220585b099e6d2ee453 (patch)
tree4ff78f6fa8f0c1b740fd43b0ade2b91dbf9226d0 /src/filter-chemistry.cpp
parentRemove deprecated Autotools and btool files. Please use CMake instead (diff)
parentMerged trunk (diff)
downloadinkscape-e5143d65bb57d4ce623e6220585b099e6d2ee453.tar.gz
inkscape-e5143d65bb57d4ce623e6220585b099e6d2ee453.zip
Merged gsoc work. Created better data structure for selections, replaced SPObject children list, improved spray tool, split tests to separate executables
(bzr r15047)
Diffstat (limited to 'src/filter-chemistry.cpp')
-rw-r--r--src/filter-chemistry.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp
index 3618b2642..560e73322 100644
--- a/src/filter-chemistry.cpp
+++ b/src/filter-chemistry.cpp
@@ -46,8 +46,8 @@ static guint count_filter_hrefs(SPObject *o, SPFilter *filter)
i ++;
}
- for ( SPObject *child = o->firstChild(); child; child = child->getNext() ) {
- i += count_filter_hrefs(child, filter);
+ for (auto& child: o->children) {
+ i += count_filter_hrefs(&child, filter);
}
return i;
@@ -486,16 +486,14 @@ void remove_filter_gaussian_blur (SPObject *item)
bool filter_is_single_gaussian_blur(SPFilter *filter)
{
- return (filter->firstChild() &&
- (filter->firstChild() == filter->lastChild()) &&
- SP_IS_GAUSSIANBLUR(filter->firstChild()));
+ return (filter->children.size() == 1 &&
+ SP_IS_GAUSSIANBLUR(&filter->children.front()));
}
double get_single_gaussian_blur_radius(SPFilter *filter)
{
- if (filter->firstChild() &&
- (filter->firstChild() == filter->lastChild()) &&
- SP_IS_GAUSSIANBLUR(filter->firstChild())) {
+ if (filter->children.size() == 1 &&
+ SP_IS_GAUSSIANBLUR(&filter->children.front())) {
SPGaussianBlur *gb = SP_GAUSSIANBLUR(filter->firstChild());
double x = gb->stdDeviation.getNumber();