]> git.lyx.org Git - lyx.git/commitdiff
Call lyx::next and lyx::prev explicitely. In case libc++ provides
authorStephan Witt <switt@lyx.org>
Sun, 10 Jan 2016 16:59:42 +0000 (17:59 +0100)
committerStephan Witt <switt@lyx.org>
Sun, 10 Jan 2016 17:06:15 +0000 (18:06 +0100)
std::next even when not in C++11 mode this is necessary. E.g. with
clang from Xcode7 on Mac OS X.

src/Compare.cpp
src/CutAndPaste.cpp
src/Text.cpp
src/Text2.cpp
src/Text3.cpp
src/output_docbook.cpp
src/output_latex.cpp

index 2344f2526daf3c545874ace9f34af510b516c096..f5046bd2e156dfcbfb11b5b64bc2f551eb6b5600 100644 (file)
@@ -422,8 +422,8 @@ static void getParagraphList(DocRange const & range,
        pit_type startpit = range.from.pit();
        pit_type endpit = range.to.pit();
        ParagraphList const & ps_ = range.text()->paragraphs();
-       ParagraphList tmp_pars(next(ps_.begin(), startpit),
-               next(ps_.begin(), endpit + 1));
+       ParagraphList tmp_pars(lyx::next(ps_.begin(), startpit),
+               lyx::next(ps_.begin(), endpit + 1));
 
        // Remove the end of the last paragraph; afterwards, remove the
        // beginning of the first paragraph. Keep this order - there may only
index a521e1434ef32fa5506f457eb326b23756018cc5..95af6b84d18285b9add94cb10e17e1dfdf692626 100644 (file)
@@ -387,7 +387,7 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist,
 
        // Paste it!
        if (empty) {
-               pars.insert(next(pars.begin(), pit),
+               pars.insert(lyx::next(pars.begin(), pit),
                            insertion.begin(),
                            insertion.end());
 
@@ -395,7 +395,7 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist,
                mergeParagraph(buffer.params(), pars,
                               pit + insertion.size() - 1);
        } else {
-               pars.insert(next(pars.begin(), pit + 1),
+               pars.insert(lyx::next(pars.begin(), pit + 1),
                            insertion.begin(),
                            insertion.end());
 
@@ -599,8 +599,8 @@ void copySelectionHelper(Buffer const & buf, Text const & text,
        LASSERT(startpit != endpit || start <= end, return);
 
        // Clone the paragraphs within the selection.
-       ParagraphList copy_pars(next(pars.begin(), startpit),
-                               next(pars.begin(), endpit + 1));
+       ParagraphList copy_pars(lyx::next(pars.begin(), startpit),
+                               lyx::next(pars.begin(), endpit + 1));
 
        // Remove the end of the last paragraph; afterwards, remove the
        // beginning of the first paragraph. Keep this order - there may only
index fe59cb3f7108170c3ded2b0cc5d0c8ece3c37f2c..187e3872312f2ff66f3edb5705906c85703f5cfe 100644 (file)
@@ -135,7 +135,7 @@ void breakParagraphConservative(BufferParams const & bparams,
        ParagraphList & pars, pit_type par_offset, pos_type pos)
 {
        // create a new paragraph
-       Paragraph & tmp = *pars.insert(next(pars.begin(), par_offset + 1),
+       Paragraph & tmp = *pars.insert(lyx::next(pars.begin(), par_offset + 1),
                                       Paragraph());
        Paragraph & par = pars[par_offset];
 
@@ -668,7 +668,7 @@ static void breakParagraph(Text & text, pit_type par_offset, pos_type pos,
        ParagraphList & pars = text.paragraphs();
        // create a new paragraph, and insert into the list
        ParagraphList::iterator tmp =
-               pars.insert(next(pars.begin(), par_offset + 1),
+               pars.insert(lyx::next(pars.begin(), par_offset + 1),
                            Paragraph());
 
        Paragraph & par = pars[par_offset];
@@ -1643,14 +1643,14 @@ bool Text::backspacePos0(Cursor & cur)
        if (cur.lastpos() == 0
            || (cur.lastpos() == 1 && par.isSeparator(0))) {
                cur.recordUndo(prevcur.pit());
-               plist.erase(next(plist.begin(), cur.pit()));
+               plist.erase(lyx::next(plist.begin(), cur.pit()));
                needsUpdate = true;
        }
        // is previous par empty?
        else if (prevcur.lastpos() == 0
                 || (prevcur.lastpos() == 1 && prevpar.isSeparator(0))) {
                cur.recordUndo(prevcur.pit());
-               plist.erase(next(plist.begin(), prevcur.pit()));
+               plist.erase(lyx::next(plist.begin(), prevcur.pit()));
                needsUpdate = true;
        }
        // Pasting is not allowed, if the paragraphs have different
index 9e6ec8ee1f038c0dbf7815f11c6c34c14b67757c..c3d696e7e2ffcca53c5e71acc82fc0c13c112ed6 100644 (file)
@@ -906,7 +906,7 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur,
                               min(old.pit() + 1, old.lastpit()));
                ParagraphList & plist = old.text()->paragraphs();
                bool const soa = oldpar.params().startOfAppendix();
-               plist.erase(next(plist.begin(), old.pit()));
+               plist.erase(lyx::next(plist.begin(), old.pit()));
                // do not lose start of appendix marker (bug 4212)
                if (soa && old.pit() < pit_type(plist.size()))
                        plist[old.pit()].params().startOfAppendix(true);
@@ -970,7 +970,7 @@ void Text::deleteEmptyParagraphMechanism(pit_type first, pit_type last, bool tra
                        continue;
 
                if (par.empty() || (par.size() == 1 && par.isLineSeparator(0))) {
-                       pars_.erase(next(pars_.begin(), pit));
+                       pars_.erase(lyx::next(pars_.begin(), pit));
                        --pit;
                        --last;
                        continue;
index ca6ec5bc29279d7fce3c2ed7d7b8bcf407b16eee..ee0902a87a7cc5a54c3f3126a75dfb07938d01c6 100644 (file)
@@ -370,7 +370,7 @@ static void outline(OutlineOp mode, Cursor & cur)
        ParagraphList & pars = buf.text().paragraphs();
        ParagraphList::iterator const bgn = pars.begin();
        // The first paragraph of the area to be copied:
-       ParagraphList::iterator start = next(bgn, pit);
+       ParagraphList::iterator start = lyx::next(bgn, pit);
        // The final paragraph of area to be copied:
        ParagraphList::iterator finish = start;
        ParagraphList::iterator const end = pars.end();
@@ -808,7 +808,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                ParagraphList & pars = buf.text().paragraphs();
                ParagraphList::iterator bgn = pars.begin();
                // The first paragraph of the area to be selected:
-               ParagraphList::iterator start = next(bgn, pit);
+               ParagraphList::iterator start = lyx::next(bgn, pit);
                // The final paragraph of area to be selected:
                ParagraphList::iterator finish = start;
                ParagraphList::iterator end = pars.end();
index 12061ef462c3581e0b832e23be3164088ac9725b..f453fc45b16b422aa5706a8ea64833a874a93c9a 100644 (file)
@@ -327,8 +327,8 @@ void docbookParagraphs(Text const & text,
 
        // if only part of the paragraphs will be outputed
        if (runparams.par_begin !=  runparams.par_end) {
-               par = next(paragraphs.begin(), runparams.par_begin);
-               pend = next(paragraphs.begin(), runparams.par_end);
+               par = lyx::next(paragraphs.begin(), runparams.par_begin);
+               pend = lyx::next(paragraphs.begin(), runparams.par_end);
                // runparams will be passed to nested paragraphs, so
                // we have to reset the range parameters.
                const_cast<OutputParams&>(runparams).par_begin = 0;
index ee6fc313207259b40db544c40f26900fd813a1a2..5d385e5e09929b54bed248091641bd30007a3b67 100644 (file)
@@ -470,9 +470,9 @@ void latexArgInsets(ParagraphList const & pars, ParagraphList::const_iterator pi
        // get the first paragraph in sequence with this layout and depth
        pit_type offset = 0;
        while (true) {
-               if (prev(pit, offset) == pars.begin())
+               if (lyx::prev(pit, offset) == pars.begin())
                        break;
-               ParagraphList::const_iterator priorpit = prev(pit, offset + 1);
+               ParagraphList::const_iterator priorpit = lyx::prev(pit, offset + 1);
                if (priorpit->layout() == current_layout
                    && priorpit->params().depth() == current_depth)
                        ++offset;
@@ -480,7 +480,7 @@ void latexArgInsets(ParagraphList const & pars, ParagraphList::const_iterator pi
                        break;
        }
 
-       ParagraphList::const_iterator spit = prev(pit, offset);
+       ParagraphList::const_iterator spit = lyx::prev(pit, offset);
 
        for (; spit != pars.end(); ++spit) {
                if (spit->layout() != current_layout || spit->params().depth() < current_depth)