- bool operator()(FileName const & x, FileName const & y) const
- { return equivalent(x, y); }
-};
+ if (!b)
+ return false;
+ BufferStorage::const_iterator cit =
+ find(binternal.begin(), binternal.end(), b);
+ return cit != binternal.end();
+}
+
+
+bool BufferList::isOthersChild(Buffer * parent, Buffer * child) const
+{
+ LASSERT(parent, return false);
+ LASSERT(child, return false);
+ LASSERT(parent->isChild(child), return false);
+
+ // Does child document have a different parent?
+ Buffer const * parent_ = child->parent();
+ if (parent_ && parent_ != parent)
+ return true;
+
+ for(Buffer const * buf : bstore)
+ if (buf != parent && buf->isChild(child))
+ return true;
+ return false;