From 0865a5956ebacc1e816366330a4b311065ec068d Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 21 May 2011 10:19:14 +1000 Subject: Code formatting normalised to standard. --- lexers/LexCPP.cxx | 6 +++--- lexers/LexHTML.cxx | 11 +++++------ src/CallTip.cxx | 2 +- src/Editor.cxx | 4 ++-- src/ScintillaBase.cxx | 6 +++--- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index 65525a679..22477c32f 100644 --- a/lexers/LexCPP.cxx +++ b/lexers/LexCPP.cxx @@ -435,7 +435,7 @@ int SCI_METHOD LexerCPP::WordListSet(int n, const char *wl) { struct After { int line; After(int line_) : line(line_) {} - bool operator() (PPDefinition &p) const { + bool operator()(PPDefinition &p) const { return p.line > line; } }; @@ -741,7 +741,7 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle, } break; case SCE_C_TRIPLEVERBATIM: - if (sc.Match ("\"\"\"")) { + if (sc.Match("\"\"\"")) { while (sc.Match('"')) { sc.Forward(); } @@ -805,7 +805,7 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle, if (sc.chPrev == 'R') { sc.SetState(SCE_C_STRINGRAW|activitySet); rawStringTerminator = ")"; - for (int termPos = sc.currentPos + 1;;termPos++) { + for (int termPos = sc.currentPos + 1;; termPos++) { char chTerminator = styler.SafeGetCharAt(termPos, '('); if (chTerminator == '(') break; diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx index c570cd528..4c50a15a1 100644 --- a/lexers/LexHTML.cxx +++ b/lexers/LexHTML.cxx @@ -754,8 +754,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty } else if (styler.Match(j, "end")) { levelCurrent--; } - } else if ((ch == '{') || (ch == '}') || (foldComment && (ch == '/') && (chNext == '*')) ) { - levelCurrent += (((ch == '{') || (ch == '/') ) ? 1 : -1); + } else if ((ch == '{') || (ch == '}') || (foldComment && (ch == '/') && (chNext == '*'))) { + levelCurrent += (((ch == '{') || (ch == '/')) ? 1 : -1); } } else if (((state == SCE_HPHP_COMMENT) || (state == SCE_HJ_COMMENT)) && foldComment && (ch == '*') && (chNext == '/')) { levelCurrent--; @@ -882,7 +882,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty (state != SCE_HPHP_COMMENTLINE) && (ch == '<') && (chNext == '?') && - !IsScriptCommentState(state) ) { + !IsScriptCommentState(state)) { beforeLanguage = scriptLanguage; scriptLanguage = segIsScriptingIndicator(styler, i + 2, i + 6, eScriptPHP); if (scriptLanguage != eScriptPHP && isStringState(state)) continue; @@ -971,8 +971,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty styler.ColourTo(i, SCE_H_ASP); ch = static_cast(styler.SafeGetCharAt(i)); continue; - } - else if (isDjango && state == SCE_H_COMMENT && (ch == '#' && chNext == '}')) { + } else if (isDjango && state == SCE_H_COMMENT && (ch == '#' && chNext == '}')) { styler.ColourTo(i - 1, StateToPrint); i += 1; visibleChars += 1; @@ -1056,7 +1055,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty (ch == '!') && (StateToPrint != SCE_H_CDATA) && (!IsCommentState(StateToPrint)) && - (!IsScriptCommentState(StateToPrint)) ) { + (!IsScriptCommentState(StateToPrint))) { beforePreProc = state; styler.ColourTo(i - 2, StateToPrint); if ((chNext == '-') && (chNext2 == '-')) { diff --git a/src/CallTip.cxx b/src/CallTip.cxx index 604304bf8..cdc30fcbc 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -100,7 +100,7 @@ void CallTip::DrawChunk(Surface *surface, int &x, const char *s, int ends[numEnds + 2]; for (int i=0; i 0) ends[maxEnd++] = i; ends[maxEnd++] = i+1; diff --git a/src/Editor.cxx b/src/Editor.cxx index 2fa3a4340..d1d0e7f91 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6341,7 +6341,7 @@ void Editor::ButtonMove(Point pt) { if (hsStart != -1 && !PositionIsHotspot(movePos.Position())) SetHotSpotRange(NULL); - if (hotSpotClickPos != INVALID_POSITION && PositionFromLocation(pt,true,false) != hotSpotClickPos ) { + if (hotSpotClickPos != INVALID_POSITION && PositionFromLocation(pt,true,false) != hotSpotClickPos) { if (inDragDrop == ddNone) { DisplayCursor(Window::cursorText); } @@ -6725,7 +6725,7 @@ void Editor::ToggleContraction(int line) { } int Editor::ContractedFoldNext(int lineStart) { - for (int line = lineStart; lineLinesTotal(); ) { + for (int line = lineStart; lineLinesTotal();) { if (!cs.GetExpanded(line) && (pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG)) return line; line = cs.ContractedNext(line+1); diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 0e6ecc8b7..3de4a4583 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -135,16 +135,16 @@ int ScintillaBase::KeyCommand(unsigned int iMessage) { AutoCompleteMove(1); return 0; case SCI_LINEUP: - AutoCompleteMove( -1); + AutoCompleteMove(-1); return 0; case SCI_PAGEDOWN: AutoCompleteMove(5); return 0; case SCI_PAGEUP: - AutoCompleteMove( -5); + AutoCompleteMove(-5); return 0; case SCI_VCHOME: - AutoCompleteMove( -5000); + AutoCompleteMove(-5000); return 0; case SCI_LINEEND: AutoCompleteMove(5000); -- cgit v1.2.3