mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
even example code should follow the style conventions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23855 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
42fb18c6f8
commit
6c97761563
10
src/Lexer.h
10
src/Lexer.h
@ -39,12 +39,14 @@ struct keyword_item {
|
||||
|
||||
Example:
|
||||
|
||||
int readParam(LyxLex &lex) {
|
||||
int param = 1; // default value
|
||||
int readParam(LyxLex & lex)
|
||||
{
|
||||
int param = 1; // default value
|
||||
if (lex.isOK()) { // the lexer has data to read
|
||||
int p; // temporary variable
|
||||
int p; // temporary variable
|
||||
lex >> p;
|
||||
if (lex) param = p; // only use the input if reading was successful
|
||||
if (lex)
|
||||
param = p; // only use the input if reading was successful
|
||||
}
|
||||
return param;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user