]> git.lyx.org Git - lyx.git/blobdiff - src/BufferList.cpp
* GuiView.cpp:
[lyx.git] / src / BufferList.cpp
index 94fd6a728fd367c1568262e51b5022ac3caa4d91..692101d0c8e507ec660f81b8771c50e54c7e94a0 100644 (file)
@@ -29,6 +29,7 @@
 #include "support/lstrings.h"
 #include "support/Package.h"
 
+#include "support/lassert.h"
 #include <boost/bind.hpp>
 
 #include <algorithm>
@@ -80,12 +81,12 @@ BufferList::const_iterator BufferList::end() const
 
 void BufferList::release(Buffer * buf)
 {
-       BOOST_ASSERT(buf);
+       LASSERT(buf, /**/);
        BufferStorage::iterator const it =
                find(bstore.begin(), bstore.end(), buf);
        if (it != bstore.end()) {
                Buffer * tmp = (*it);
-               BOOST_ASSERT(tmp);
+               LASSERT(tmp, /**/);
                bstore.erase(it);
                delete tmp;
        }
@@ -95,7 +96,8 @@ void BufferList::release(Buffer * buf)
 Buffer * BufferList::newBuffer(string const & s, bool const ronly)
 {
        auto_ptr<Buffer> tmpbuf;
-       try { tmpbuf.reset(new Buffer(s, ronly));
+       try {
+               tmpbuf.reset(new Buffer(s, ronly));
        } catch (ExceptionMessage const & message) {
                if (message.type_ == ErrorException) {
                        Alert::error(message.title_, message.details_);
@@ -155,13 +157,13 @@ Buffer * BufferList::getBuffer(unsigned int choice)
 
 Buffer * BufferList::next(Buffer const * buf) const
 {
-       BOOST_ASSERT(buf);
+       LASSERT(buf, /**/);
 
        if (bstore.empty())
                return 0;
        BufferStorage::const_iterator it = find(bstore.begin(),
                                                bstore.end(), buf);
-       BOOST_ASSERT(it != bstore.end());
+       LASSERT(it != bstore.end(), /**/);
        ++it;
        if (it == bstore.end())
                return bstore.front();
@@ -172,13 +174,13 @@ Buffer * BufferList::next(Buffer const * buf) const
 
 Buffer * BufferList::previous(Buffer const * buf) const
 {
-       BOOST_ASSERT(buf);
+       LASSERT(buf, /**/);
 
        if (bstore.empty())
                return 0;
        BufferStorage::const_iterator it = find(bstore.begin(),
                                                bstore.end(), buf);
-       BOOST_ASSERT(it != bstore.end());
+       LASSERT(it != bstore.end(), /**/);
        if (it == bstore.begin())
                return bstore.back();
        else
@@ -283,7 +285,7 @@ bool BufferList::exists(string const & s) const
 
 bool BufferList::isLoaded(Buffer const * b) const
 {
-       BOOST_ASSERT(b);
+       LASSERT(b, /**/);
        BufferStorage::const_iterator cit =
                find(bstore.begin(), bstore.end(), b);
        return cit != bstore.end();