diff options
| author | Joe Mueller <unknown> | 2015-07-30 14:35:17 +1000 | 
|---|---|---|
| committer | Joe Mueller <unknown> | 2015-07-30 14:35:17 +1000 | 
| commit | 58471e908a3b74b27379bb19a13d62cd8d4476b0 (patch) | |
| tree | 8f61293f34d008fea20584c631d23e58b3fe53aa /lexers/LexPO.cxx | |
| parent | 2270ab97445c6f12bd0fddb273ab617fdb421594 (diff) | |
| download | scintilla-mirror-58471e908a3b74b27379bb19a13d62cd8d4476b0.tar.gz | |
Use Sci_Position / Sci_PositionU for variables in lexers that represent
positions and line numbers and may be widened to 64-bits in a future release.
Diffstat (limited to 'lexers/LexPO.cxx')
| -rw-r--r-- | lexers/LexPO.cxx | 16 | 
1 files changed, 8 insertions, 8 deletions
diff --git a/lexers/LexPO.cxx b/lexers/LexPO.cxx index d2532cb2e..61e601126 100644 --- a/lexers/LexPO.cxx +++ b/lexers/LexPO.cxx @@ -38,7 +38,7 @@ using namespace Scintilla;  static void ColourisePODoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler) {  	StyleContext sc(startPos, length, initStyle, styler);  	bool escaped = false; -	int curLine = styler.GetLine(startPos); +	Sci_Position curLine = styler.GetLine(startPos);  	// the line state holds the last state on or before the line that isn't the default style  	int curLineState = curLine > 0 ? styler.GetLineState(curLine - 1) : SCE_PO_DEFAULT; @@ -148,9 +148,9 @@ static void ColourisePODoc(Sci_PositionU startPos, Sci_Position length, int init  	sc.Complete();  } -static int FindNextNonEmptyLineState(unsigned int startPos, Accessor &styler) { -	unsigned int length = styler.Length(); -	for (unsigned int i = startPos; i < length; i++) { +static int FindNextNonEmptyLineState(Sci_PositionU startPos, Accessor &styler) { +	Sci_PositionU length = styler.Length(); +	for (Sci_PositionU i = startPos; i < length; i++) {  		if (! isspacechar(styler[i])) {  			return styler.GetLineState(styler.GetLine(i));  		} @@ -164,8 +164,8 @@ static void FoldPODoc(Sci_PositionU startPos, Sci_Position length, int, WordList  	bool foldCompact = styler.GetPropertyInt("fold.compact") != 0;  	bool foldComment = styler.GetPropertyInt("fold.comment") != 0; -	unsigned int endPos = startPos + length; -	int curLine = styler.GetLine(startPos); +	Sci_PositionU endPos = startPos + length; +	Sci_Position curLine = styler.GetLine(startPos);  	int lineState = styler.GetLineState(curLine);  	int nextLineState;  	int level = styler.LevelAt(curLine) & SC_FOLDLEVELNUMBERMASK; @@ -173,7 +173,7 @@ static void FoldPODoc(Sci_PositionU startPos, Sci_Position length, int, WordList  	int visible = 0;  	int chNext = styler[startPos]; -	for (unsigned int i = startPos; i < endPos; i++) { +	for (Sci_PositionU i = startPos; i < endPos; i++) {  		int ch = chNext;  		chNext = styler.SafeGetCharAt(i+1); @@ -181,7 +181,7 @@ static void FoldPODoc(Sci_PositionU startPos, Sci_Position length, int, WordList  			visible++;  		} else if ((ch == '\r' && chNext != '\n') || ch == '\n' || i+1 >= endPos) {  			int lvl = level; -			int nextLine = curLine + 1; +			Sci_Position nextLine = curLine + 1;  			nextLineState = styler.GetLineState(nextLine);  			if ((lineState != SCE_PO_COMMENT || foldComment) &&  | 
