small patches from Angus

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3316 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-01-08 15:13:31 +00:00
parent 9a5f7d1fe4
commit 6b388ac30d
3 changed files with 4 additions and 4 deletions

View File

@ -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) { for (MathInset::difference_type i = pos() - 1; i >= 0; --i) {
MathAtom & p = array().at(i); MathAtom & p = array().at(i);
@ -859,7 +859,7 @@ bool MathCursor::selection() const
MathGridInset * MathCursor::enclosingGrid(MathCursor::idx_type & idx) 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(); MathGridInset * p = Cursor_[i].par_->asGridInset();
if (p) { if (p) {
idx = Cursor_[i].idx_; idx = Cursor_[i].idx_;

View File

@ -258,7 +258,7 @@ private:
/// ///
string macroName() const; string macroName() const;
/// ///
int macroNamePos() const; MathInset::difference_type macroNamePos() const;
/// ///
void insert(char, MathTextCodes t); void insert(char, MathTextCodes t);
/// can we enter the inset? /// can we enter the inset?

View File

@ -19,7 +19,7 @@ MathMacroArgument::MathMacroArgument(int n)
<< n << std::endl; << n << std::endl;
} }
str_[0] = '#'; str_[0] = '#';
str_[1] = '0' + static_cast<unsigned char>(n); str_[1] = static_cast<unsigned char>('0' + n);
str_[2] = '\0'; str_[2] = '\0';
} }