]> git.lyx.org Git - features.git/commitdiff
constify
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 13 Nov 2009 13:47:25 +0000 (13:47 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 13 Nov 2009 13:47:25 +0000 (13:47 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31968 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/lstrings.cpp

index 402b2c31190781e1ff746b16c7c8faef0441002d..221c676c6bb42854fa64a411e9835b92dea73124 100644 (file)
@@ -958,7 +958,7 @@ vector<docstring> wrapToVec(docstring const & str, int ind,
        vector<docstring> retval;
        while (s.size() > width) {
                // find the last space within the first 'width' chars
-               size_t i = s.find_last_of(' ', width - 1);
+               size_t const i = s.find_last_of(' ', width - 1);
                if (i == docstring::npos || i <= size_t(ind)) {
                        // no space found
                        s = s.substr(0, width - 3) + "...";
@@ -993,11 +993,11 @@ docstring wrapParas(docstring const & str, int const indent,
        if (str.empty())
                return docstring();
 
-       vector<docstring> pars = getVectorFromString(str, from_ascii("\n"), true);
+       vector<docstring> const pars = getVectorFromString(str, from_ascii("\n"), true);
        vector<docstring> retval;
 
-       vector<docstring>::iterator it = pars.begin();
-       vector<docstring>::iterator en = pars.end();
+       vector<docstring>::const_iterator it = pars.begin();
+       vector<docstring>::const_iterator const en = pars.end();
        for (; it != en; ++it) {
                vector<docstring> tmp = wrapToVec(*it, indent, width);
                size_t const nlines = tmp.size();