Bug 1542736 - Part 8: Replace std::isalpha with mozilla::IsAsciiAlpha. r=jwalden

More removal of ctype functions.

Differential Revision: https://phabricator.services.mozilla.com/D26511

--HG--
extra : moz-landing-system : lando
This commit is contained in:
André Bargull 2019-04-11 11:37:22 +00:00
Родитель 0c99203bf6
Коммит 5f26e8e10b
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -8,6 +8,8 @@
#include "shell/OSObject.h"
#include "mozilla/TextUtils.h"
#include <errno.h>
#include <stdlib.h>
#ifdef XP_WIN
@ -77,8 +79,8 @@ static bool IsAbsolutePath(const UniqueChars& filename) {
// The first two cases are handled by the test above so we only need a test
// for the last one here.
if ((strlen(pathname) > 3 && isalpha(pathname[0]) && pathname[1] == ':' &&
pathname[2] == '\\')) {
if ((strlen(pathname) > 3 && mozilla::IsAsciiAlpha(pathname[0]) &&
pathname[1] == ':' && pathname[2] == '\\')) {
return true;
}
#endif