We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc1fb6a commit 590e7ceCopy full SHA for 590e7ce
lib/Parser/Scan.cpp
@@ -10,19 +10,18 @@
10
* a given character can be part of an identifier, and so on.
11
*/
12
13
-int CountNewlines(LPCOLESTR psz, int cch)
+int CountNewlines(LPCOLESTR psz)
14
{
15
int cln = 0;
16
17
- while (0 != *psz && 0 != cch--)
+ while (0 != *psz)
18
19
switch (*psz++)
20
21
case _u('\xD'):
22
- if (cch != 0 && *psz == _u('\xA'))
+ if (*psz == _u('\xA'))
23
24
++psz;
25
- --cch;
26
}
27
// fall-through
28
case _u('\xA'):
lib/Parser/Scan.h
@@ -12,7 +12,7 @@ namespace Js
#include "Windows.Globalization.h"
#endif
-int CountNewlines(LPCOLESTR psz, int cch = -1);
+int CountNewlines(LPCOLESTR psz);
class Parser;
struct ParseContext;
0 commit comments