From: Vincent van Ravesteijn Date: Sun, 22 Nov 2009 21:45:51 +0000 (+0000) Subject: Some cosmetics after r32157. X-Git-Tag: 2.0.0~5041 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=92c8561674547dc5d3030d1956cb67ec052add54;p=features.git Some cosmetics after r32157. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32159 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 14e31f922c..349725c579 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -2163,9 +2163,9 @@ bool notifyCursorLeavesOrEnters(Cursor const & old, Cursor & cur) // notify everything on top of the common part in old cursor, // but stop if the inset claims the cursor to be invalid now for (size_type j = i; j < old.depth(); ++j) { - Cursor insetPos = old; - insetPos.cutOff(j); - if (old[j].inset().notifyCursorLeaves(insetPos, cur)) + Cursor inset_pos = old; + inset_pos.cutOff(j); + if (old[j].inset().notifyCursorLeaves(inset_pos, cur)) return true; } diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index f54e1a7dfb..ac75549e40 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -457,11 +457,11 @@ void InsetMathHull::initUnicodeMath() const } -void InsetMathHull::addPreview(DocIterator const & insetPos, +void InsetMathHull::addPreview(DocIterator const & inset_pos, graphics::PreviewLoader & /*ploader*/) const { if (RenderPreview::status() == LyXRC::PREVIEW_ON) { - reloadPreview(insetPos); + reloadPreview(inset_pos); } } diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h index 001b2e3ee4..95ae8497b7 100644 --- a/src/mathed/InsetMathHull.h +++ b/src/mathed/InsetMathHull.h @@ -132,7 +132,7 @@ public: /// //bool insetAllowed(InsetCode code) const; /// - void addPreview(DocIterator const & insetPos, + void addPreview(DocIterator const & inset_pos, graphics::PreviewLoader &) const; /// Recreate the preview if preview is enabled. void reloadPreview(DocIterator const & pos) const; diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index 2d74457040..b36bf19d15 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -631,9 +631,10 @@ bool MathMacroTemplate::notifyCursorLeaves(Cursor const & old, Cursor & cur) void MathMacroTemplate::removeArguments(Cursor & cur, - DocIterator const & /*insetPos*/, int from, int to) + DocIterator const & /*inset_pos*/, int from, int to) { - for (DocIterator it = doc_iterator_begin(&buffer(), this); it; it.forwardChar()) { + DocIterator it = doc_iterator_begin(&buffer(), this); + for (; it; it.forwardChar()) { if (!it.nextInset()) continue; if (it.nextInset()->lyxCode() != MATH_MACROARG_CODE) @@ -716,15 +717,15 @@ void MathMacroTemplate::insertMissingArguments(int maxArg) void MathMacroTemplate::changeArity(Cursor & cur, - DocIterator const & insetPos, int newNumArg) + DocIterator const & inset_pos, int newNumArg) { // remove parameter which do not appear anymore in the definition for (int i = numargs_; i > newNumArg; --i) - removeParameter(cur, insetPos, numargs_ - 1, false); + removeParameter(cur, inset_pos, numargs_ - 1, false); // add missing parameter for (int i = numargs_; i < newNumArg; ++i) - insertParameter(cur, insetPos, numargs_, false, false); + insertParameter(cur, inset_pos, numargs_, false, false); }