diff options
| author | Neil Hodgson <nyamatongwe@gmail.com> | 2017-09-25 11:18:25 +1000 | 
|---|---|---|
| committer | Neil Hodgson <nyamatongwe@gmail.com> | 2017-09-25 11:18:25 +1000 | 
| commit | 57d8b220e6fb11a6070ffc81948eb5d53ec51c9b (patch) | |
| tree | 24b4fec41c6baedef1360116f946eb2123b01452 /lexers/LexPerl.cxx | |
| parent | a230b72625317dd9235d92fd92c802a91842f0c6 (diff) | |
| download | scintilla-mirror-57d8b220e6fb11a6070ffc81948eb5d53ec51c9b.tar.gz | |
Avoiding comma operator warnings from Clang in lexers.
Diffstat (limited to 'lexers/LexPerl.cxx')
| -rw-r--r-- | lexers/LexPerl.cxx | 12 | 
1 files changed, 7 insertions, 5 deletions
| diff --git a/lexers/LexPerl.cxx b/lexers/LexPerl.cxx index 1ea6bd589..34f525586 100644 --- a/lexers/LexPerl.cxx +++ b/lexers/LexPerl.cxx @@ -121,8 +121,8 @@ static int disambiguateBareword(LexAccessor &styler, Sci_PositionU bk, Sci_Posit  	// if ch isn't one of '[{(,' we can skip the test  	if ((ch == '{' || ch == '(' || ch == '['|| ch == ',')  	        && fw < endPos) { -		while (ch = static_cast<unsigned char>(styler.SafeGetCharAt(fw)), -		        IsASpaceOrTab(ch) && fw < endPos) { +		while (IsASpaceOrTab(ch = static_cast<unsigned char>(styler.SafeGetCharAt(fw))) +		        && fw < endPos) {  			fw++;  		}  		if ((ch == '}' && brace) @@ -137,10 +137,12 @@ static int disambiguateBareword(LexAccessor &styler, Sci_PositionU bk, Sci_Posit  static void skipWhitespaceComment(LexAccessor &styler, Sci_PositionU &p) {  	// when backtracking, we need to skip whitespace and comments -	int style; -	while ((p > 0) && (style = styler.StyleAt(p), -	        style == SCE_PL_DEFAULT || style == SCE_PL_COMMENTLINE)) +	while (p > 0) { +		const int style = styler.StyleAt(p); +		if (style != SCE_PL_DEFAULT && style != SCE_PL_COMMENTLINE) +			break;  		p--; +	}  }  static int findPrevLexeme(LexAccessor &styler, Sci_PositionU &bk, int &style) { | 
