From 6b388ac30d5340415896afcda2f07f0b0bc56e1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Tue, 8 Jan 2002 15:13:31 +0000 Subject: [PATCH] small patches from Angus git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3316 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_cursor.C | 4 ++-- src/mathed/math_cursor.h | 2 +- src/mathed/math_macroarg.C | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index 3a2f305013..e54922cae0 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -617,7 +617,7 @@ void MathCursor::macroModeClose() } -int MathCursor::macroNamePos() const +MathInset::difference_type MathCursor::macroNamePos() const { for (MathInset::difference_type i = pos() - 1; i >= 0; --i) { MathAtom & p = array().at(i); @@ -859,7 +859,7 @@ bool MathCursor::selection() const MathGridInset * MathCursor::enclosingGrid(MathCursor::idx_type & idx) const { - for (int i = Cursor_.size() - 1; i >= 0; --i) { + for (MathInset::difference_type i = Cursor_.size() - 1; i >= 0; --i) { MathGridInset * p = Cursor_[i].par_->asGridInset(); if (p) { idx = Cursor_[i].idx_; diff --git a/src/mathed/math_cursor.h b/src/mathed/math_cursor.h index a192a82dc7..6e2742fd65 100644 --- a/src/mathed/math_cursor.h +++ b/src/mathed/math_cursor.h @@ -258,7 +258,7 @@ private: /// string macroName() const; /// - int macroNamePos() const; + MathInset::difference_type macroNamePos() const; /// void insert(char, MathTextCodes t); /// can we enter the inset? diff --git a/src/mathed/math_macroarg.C b/src/mathed/math_macroarg.C index a9a565160f..f655103832 100644 --- a/src/mathed/math_macroarg.C +++ b/src/mathed/math_macroarg.C @@ -19,7 +19,7 @@ MathMacroArgument::MathMacroArgument(int n) << n << std::endl; } str_[0] = '#'; - str_[1] = '0' + static_cast(n); + str_[1] = static_cast('0' + n); str_[2] = '\0'; } -- 2.39.2