]> git.lyx.org Git - lyx.git/blobdiff - src/BufferList.cpp
Amend 7e121117bb3203
[lyx.git] / src / BufferList.cpp
index 8a94c4208cd4b2de0dc10a44c8b22f4ad05865e6..a61b0bfd80fdd8d80229601eb96537b7b8557fa7 100644 (file)
@@ -96,7 +96,7 @@ void BufferList::release(Buffer * buf)
        BufferStorage::iterator const it =
                find(bstore.begin(), bstore.end(), buf);
        if (it != bstore.end()) {
-               Buffer const * parent = buf ? buf->parent() : 0;
+               Buffer const * parent = buf->parent();
                Buffer * tmp = (*it);
                bstore.erase(it);
                LASSERT(tmp, return);
@@ -201,7 +201,7 @@ Buffer * BufferList::next(Buffer const * buf) const
 
        if (bstore.empty())
                return 0;
-       BufferStorage::const_iterator it = 
+       BufferStorage::const_iterator it =
                        find(bstore.begin(), bstore.end(), buf);
        LASSERT(it != bstore.end(), return 0);
        ++it;
@@ -217,7 +217,7 @@ Buffer * BufferList::previous(Buffer const * buf) const
 
        if (bstore.empty())
                return 0;
-       BufferStorage::const_iterator it = 
+       BufferStorage::const_iterator it =
                        find(bstore.begin(), bstore.end(), buf);
        LASSERT(it != bstore.end(), return 0);
 
@@ -284,7 +284,7 @@ bool BufferList::isOthersChild(Buffer * parent, Buffer * child)
        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)