]> git.lyx.org Git - lyx.git/blobdiff - src/TocBackend.cpp
This doesn't return a reference any more.
[lyx.git] / src / TocBackend.cpp
index 9e558aab3050a338c89e72f433b5b1cad1400c92..02f7506e599e7333a853defe650226f1fbddccd4 100644 (file)
 #include "support/debug.h"
 #include "support/docstream.h"
 
+#include "support/assert.h"
+
 using namespace std;
 
+
 namespace lyx {
 
 ///////////////////////////////////////////////////////////////////////////
@@ -86,7 +89,7 @@ Toc const & TocBackend::toc(string const & type) const
 {
        // Is the type already supported?
        TocList::const_iterator it = tocs_.find(type);
-       BOOST_ASSERT(it != tocs_.end());
+       LASSERT(it != tocs_.end(), /**/);
 
        return it->second;
 }
@@ -132,7 +135,7 @@ void TocBackend::updateItem(ParConstIterator const & par_it)
                }
        }
 
-       int const toclevel = toc_item->par_it_->layout()->toclevel;
+       int const toclevel = toc_item->par_it_->layout().toclevel;
        if (toclevel != Layout::NOT_IN_TOC && toclevel >= min_toclevel
                && tocstring.empty())
                        tocstring = toc_item->par_it_->asString(true);
@@ -181,7 +184,7 @@ void TocBackend::update()
                }
 
                /// now the toc entry for the paragraph
-               int const toclevel = pit->layout()->toclevel;
+               int const toclevel = pit->layout().toclevel;
                if (toclevel != Layout::NOT_IN_TOC
                    && toclevel >= min_toclevel) {
                        // insert this into the table of contents
@@ -199,7 +202,7 @@ TocIterator TocBackend::item(string const & type,
 {
        TocList::const_iterator toclist_it = tocs_.find(type);
        // Is the type supported?
-       BOOST_ASSERT(toclist_it != tocs_.end());
+       LASSERT(toclist_it != tocs_.end(), /**/);
 
        Toc const & toc_vector = toclist_it->second;
        TocIterator last = toc_vector.begin();