diff options
author | nyamatongwe <unknown> | 2001-09-01 22:23:41 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2001-09-01 22:23:41 +0000 |
commit | 0d238afb884e070519d07c203dcec786bf4b848f (patch) | |
tree | 2cf438c666ceaecebb6922ecc90cbbd1e1cd6af9 /src/LexCPP.cxx | |
parent | 8a65724f63a64a7c4e721eb7ab3b3a3672180a38 (diff) | |
download | scintilla-mirror-0d238afb884e070519d07c203dcec786bf4b848f.tar.gz |
Performance optimisation.
Diffstat (limited to 'src/LexCPP.cxx')
-rw-r--r-- | src/LexCPP.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx index 45aa31493..8bed66c3d 100644 --- a/src/LexCPP.cxx +++ b/src/LexCPP.cxx @@ -178,16 +178,18 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo ColouriseContext cc(startPos, length, initStyle, styler); for (; cc.More(); cc.Forward()) { - if (cc.Match("\\\n")) { - cc.Forward(); - cc.Forward(); - continue; - } - if (cc.Match("\\\r\n")) { - cc.Forward(); - cc.Forward(); - cc.Forward(); - continue; + if (cc.ch == '\\') { + if (cc.Match("\\\n")) { + cc.Forward(); + cc.Forward(); + continue; + } + if (cc.Match("\\\r\n")) { + cc.Forward(); + cc.Forward(); + cc.Forward(); + continue; + } } if (cc.state == SCE_C_OPERATOR) { |