From: André Pönitz Date: Wed, 16 Jul 2003 14:20:43 +0000 (+0000) Subject: 'fix' stupid compiler warnings X-Git-Tag: 1.6.10~16533 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a105cf94a985320f1fa170ce393a733d74885578;p=features.git 'fix' stupid compiler warnings git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7291 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index aed61cef26..99a653c03c 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -510,7 +510,7 @@ dispatch_result InsetFormulaBase::localDispatch(FuncRequest const & cmd) } case LFUN_PASTE: { - int n = 0; + size_t n = 0; istringstream is(cmd.argument.c_str()); is >> n; if (was_macro) diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index a8c143af4c..86ce84ce17 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -581,7 +581,7 @@ void MathCursor::selDel() } -void MathCursor::selPaste(int n) +void MathCursor::selPaste(size_t n) { dump("selPaste"); selClearOrDel(); diff --git a/src/mathed/math_cursor.h b/src/mathed/math_cursor.h index 08a019d0ae..e3f35b6578 100644 --- a/src/mathed/math_cursor.h +++ b/src/mathed/math_cursor.h @@ -152,7 +152,7 @@ public: /// void selDel(); /// pastes n-th element of cut buffer - void selPaste(int n); + void selPaste(size_t n); /// void selHandle(bool); /// diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index cc098d3ec6..9ef17d6d32 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -151,21 +151,21 @@ void catInit() fill(theCatcode + 'a', theCatcode + 'z' + 1, catLetter); fill(theCatcode + 'A', theCatcode + 'Z' + 1, catLetter); - theCatcode['\\'] = catEscape; - theCatcode['{'] = catBegin; - theCatcode['}'] = catEnd; - theCatcode['$'] = catMath; - theCatcode['&'] = catAlign; - theCatcode['\n'] = catNewline; - theCatcode['#'] = catParameter; - theCatcode['^'] = catSuper; - theCatcode['_'] = catSub; - theCatcode[''] = catIgnore; - theCatcode[' '] = catSpace; - theCatcode['\t'] = catSpace; - theCatcode['\r'] = catNewline; - theCatcode['~'] = catActive; - theCatcode['%'] = catComment; + theCatcode[int('\\')] = catEscape; + theCatcode[int('{')] = catBegin; + theCatcode[int('}')] = catEnd; + theCatcode[int('$')] = catMath; + theCatcode[int('&')] = catAlign; + theCatcode[int('\n')] = catNewline; + theCatcode[int('#')] = catParameter; + theCatcode[int('^')] = catSuper; + theCatcode[int('_')] = catSub; + theCatcode[int('')] = catIgnore; + theCatcode[int(' ')] = catSpace; + theCatcode[int('\t')] = catSpace; + theCatcode[int('\r')] = catNewline; + theCatcode[int('~')] = catActive; + theCatcode[int('%')] = catComment; }