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:
André Pönitz 2008-03-20 20:36:30 +00:00
parent 42fb18c6f8
commit 6c97761563

View File

@ -39,12 +39,14 @@ struct keyword_item {
Example:
int readParam(LyxLex &lex) {
int readParam(LyxLex & lex)
{
int param = 1; // default value
if (lex.isOK()) { // the lexer has data to read
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;
}