]> git.lyx.org Git - features.git/blobdiff - src/Text.cpp
The way this was done here is inconsistent with how it is done
[features.git] / src / Text.cpp
index eac26ea5d8f5c01c994186d3de6bff2f8a233782..889c21b7f410f0b825858a37373461a58db9a5c2 100644 (file)
@@ -69,7 +69,6 @@
 #include "support/lyxalgo.h"
 #include "support/textutils.h"
 
-#include <limits>
 #include <sstream>
 
 
@@ -2049,10 +2048,7 @@ docstring Text::asString(pit_type beg, pit_type end, int options) const
 
 void Text::forOutliner(docstring & os, size_t maxlen, bool shorten) const
 {
-       if (maxlen == 0)
-               maxlen = std::numeric_limits<std::size_t>::max();
-       else
-               LASSERT(maxlen >= 8, maxlen = TOC_ENTRY_LENGTH);
+       LASSERT(maxlen >= 8, maxlen = TOC_ENTRY_LENGTH);
        for (size_t i = 0; i != pars_.size() && os.length() < maxlen; ++i)
                pars_[i].forOutliner(os, maxlen);
        if (shorten && os.length() >= maxlen)