diff options
Diffstat (limited to 'src/object-set.cpp')
| -rw-r--r-- | src/object-set.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/object-set.cpp b/src/object-set.cpp index 627544a21..518ce15a3 100644 --- a/src/object-set.cpp +++ b/src/object-set.cpp @@ -174,13 +174,8 @@ bool ObjectSet::isEmpty() { return container.size() == 0; } - SPObject *ObjectSet::single() { - if (container.size() == 1) { - return *container.begin(); - } - - return nullptr; + return container.size() == 1 ? *container.begin() : nullptr; } SPItem *ObjectSet::singleItem() { @@ -257,27 +252,6 @@ void ObjectSet::set(SPObject *object) { // _emitSignals(); } -void ObjectSet::setList(const std::vector<SPItem *> &objs) { - _clear(); - addList(objs); -} - -void ObjectSet::addList(const std::vector<SPItem *> &objs) { - for (std::vector<SPItem*>::const_iterator iter = objs.begin(); iter != objs.end(); ++iter) { - SPObject *obj = *iter; - if (!includes(obj)) { - add(obj); - } - } -} - -void ObjectSet::add(const std::vector<SPItem*>::iterator& from, const std::vector<SPItem*>::iterator& to) { - for(auto it = from; it != to; ++it) { - _add(*it); - } -} - - Geom::OptRect ObjectSet::bounds(SPItem::BBoxType type) const { return (type == SPItem::GEOMETRIC_BBOX) ? |
