зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1542736
- Part 9: Replace std::isspace with js::unicode::IsSpace. r=jwalden
Remove the last remaining call to ctype functions. Differential Revision: https://phabricator.services.mozilla.com/D26512 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5f26e8e10b
Коммит
bc37112b80
|
@ -6,11 +6,12 @@
|
|||
|
||||
#include "shell/jsoptparse.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "jsutil.h"
|
||||
|
||||
#include "util/Unicode.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::cli;
|
||||
using namespace js::cli::detail;
|
||||
|
@ -75,16 +76,16 @@ static void PrintParagraph(const char* text, unsigned startColno,
|
|||
}
|
||||
|
||||
/* Skip any leading spaces. */
|
||||
while (*it != '\0' && isspace(*it)) {
|
||||
while (*it != '\0' && unicode::IsSpace(*it)) {
|
||||
++it;
|
||||
}
|
||||
|
||||
while (*it != '\0') {
|
||||
MOZ_ASSERT(!isspace(*it) || *it == '\n');
|
||||
MOZ_ASSERT(!unicode::IsSpace(*it) || *it == '\n');
|
||||
|
||||
/* Delimit the current token. */
|
||||
const char* limit = it;
|
||||
while (!isspace(*limit) && *limit != '\0') {
|
||||
while (!unicode::IsSpace(*limit) && *limit != '\0') {
|
||||
++limit;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче