diff options
Diffstat (limited to 'lexers')
| -rw-r--r-- | lexers/LexCPP.cxx | 6 | ||||
| -rw-r--r-- | lexers/LexPython.cxx | 4 | 
2 files changed, 5 insertions, 5 deletions
| diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index d08ed7eac..bd9977b81 100644 --- a/lexers/LexCPP.cxx +++ b/lexers/LexCPP.cxx @@ -54,7 +54,7 @@ bool IsSpaceEquiv(int state) {  // Putting a space between the '++' post-inc operator and the '+' binary op  // fixes this, and is highly recommended for readability anyway.  bool FollowsPostfixOperator(StyleContext &sc, LexAccessor &styler) { -	Sci_Position pos = (Sci_Position) sc.currentPos; +	Sci_Position pos = static_cast<Sci_Position>(sc.currentPos);  	while (--pos > 0) {  		const char ch = styler[pos];  		if (ch == '+' || ch == '-') { @@ -66,7 +66,7 @@ bool FollowsPostfixOperator(StyleContext &sc, LexAccessor &styler) {  bool followsReturnKeyword(StyleContext &sc, LexAccessor &styler) {  	// Don't look at styles, so no need to flush. -	Sci_Position pos = (Sci_Position) sc.currentPos; +	Sci_Position pos = static_cast<Sci_Position>(sc.currentPos);  	Sci_Position currentLine = styler.GetLine(pos);  	const Sci_Position lineStartPos = styler.LineStart(currentLine);  	while (--pos > lineStartPos) { @@ -145,7 +145,7 @@ void highlightTaskMarker(StyleContext &sc, LexAccessor &styler,  	if ((isoperator(sc.chPrev) || IsASpace(sc.chPrev)) && markerList.Length()) {  		const int lengthMarker = 50;  		char marker[lengthMarker+1]; -		Sci_Position currPos = (Sci_Position) sc.currentPos; +		Sci_Position currPos = static_cast<Sci_Position>(sc.currentPos);  		int i = 0;  		while (i < lengthMarker) {  			const char ch = styler.SafeGetCharAt(currPos + i); diff --git a/lexers/LexPython.cxx b/lexers/LexPython.cxx index f80721e2a..328ed7363 100644 --- a/lexers/LexPython.cxx +++ b/lexers/LexPython.cxx @@ -435,7 +435,7 @@ void LexerPython::ProcessLineEnd(StyleContext &sc, std::vector<SingleFStringExpS  	if (deepestSingleStateIndex != -1) {  		sc.SetState(fstringStateStack[deepestSingleStateIndex].state); -		while (fstringStateStack.size() > (unsigned long)deepestSingleStateIndex) { +		while (fstringStateStack.size() > static_cast<unsigned long>(deepestSingleStateIndex)) {  			PopFromStateStack(fstringStateStack, currentFStringExp);  		}  	} @@ -714,7 +714,7 @@ void SCI_METHOD LexerPython::Lex(Sci_PositionU startPos, Sci_Position length, in  				sc.ForwardSetState(SCE_P_DEFAULT);  				needEOLCheck = true; -				while (fstringStateStack.size() > (unsigned long)matching_stack_i) { +				while (fstringStateStack.size() > static_cast<unsigned long>(matching_stack_i)) {  					PopFromStateStack(fstringStateStack, currentFStringExp);  				}  			} | 
