Bug 1542736 - Part 7: Replace std::tolower with js::unicode::ToLowerCase. r=jwalden

std::tolower can be safely replaced with js::unicode::ToLowerCase in both contexts.

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

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

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

@ -8,13 +8,13 @@
#include "mozilla/ScopeExit.h"
#include <ctype.h>
#include <type_traits>
#include "jit/JitSpewer.h"
#include "jit/MIR.h"
#include "jit/MIRGenerator.h"
#include "js/Printf.h"
#include "util/Unicode.h"
using namespace js;
using namespace js::jit;
@ -334,7 +334,7 @@ void LNode::printName(GenericPrinter& out, Opcode op) {
const char* name = names[uint32_t(op)];
size_t len = strlen(name);
for (size_t i = 0; i < len; i++) {
out.printf("%c", tolower(name[i]));
out.printf("%c", unicode::ToLowerCase(name[i]));
}
}

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

@ -12,8 +12,6 @@
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/MathAlgorithms.h"
#include <ctype.h>
#include "jslibmath.h"
#include "builtin/RegExp.h"
@ -26,6 +24,7 @@
#include "jit/RangeAnalysis.h"
#include "js/Conversions.h"
#include "util/Text.h"
#include "util/Unicode.h"
#include "wasm/WasmCode.h"
#include "builtin/Boolean-inl.h"
@ -81,7 +80,7 @@ void MDefinition::PrintOpcodeName(GenericPrinter& out, Opcode op) {
const char* name = OpcodeName(op);
size_t len = strlen(name);
for (size_t i = 0; i < len; i++) {
out.printf("%c", tolower(name[i]));
out.printf("%c", unicode::ToLowerCase(name[i]));
}
}
#endif