forked from qt-creator/qt-creator
		
	C++: Simplify Lexer::yyinp()
... by assuming we operate on NUL-terminated data, which is (in theory) guaranteed by (non-raw) QByteArray which we have. Change-Id: I855d01ea0dee5328ec737fbabee1086d7a28aa5a Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
		
							
								
								
									
										10
									
								
								src/libs/3rdparty/cplusplus/Lexer.h
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								src/libs/3rdparty/cplusplus/Lexer.h
									
									
									
									
										vendored
									
									
								
							| @@ -99,13 +99,9 @@ private: | ||||
|  | ||||
|     inline void yyinp() | ||||
|     { | ||||
|         if (++_currentChar == _lastChar) | ||||
|             _yychar = 0; | ||||
|         else { | ||||
|             _yychar = *_currentChar; | ||||
|             if (_yychar == '\n') | ||||
|                 pushLineStartOffset(); | ||||
|         } | ||||
|         _yychar = *++_currentChar; | ||||
|         if (Q_UNLIKELY(_yychar == '\n')) | ||||
|             pushLineStartOffset(); | ||||
|     } | ||||
|  | ||||
|     void pushLineStartOffset(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user