mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
Switched to using appendChars
This commit is contained in:
parent
ca9231c255
commit
b79a5dc2ab
@ -146,9 +146,7 @@ static void readEvalPrint(istream &in)
|
||||
while (promptLine(in, line, buffer.empty() ? "js> " : "")) {
|
||||
if (!buffer.empty())
|
||||
buffer += uni::lf;
|
||||
String::size_type bufferLen = buffer.size();
|
||||
buffer.append(line.size(), uni::null);
|
||||
std::transform(line.begin(), line.end(), buffer.begin()+bufferLen, widen);
|
||||
appendChars(buffer, line.data(), line.size());
|
||||
if (!buffer.empty()) {
|
||||
showString(std::cout, buffer);
|
||||
std::cout << std::endl;
|
||||
|
@ -146,9 +146,7 @@ static void readEvalPrint(istream &in)
|
||||
while (promptLine(in, line, buffer.empty() ? "js> " : "")) {
|
||||
if (!buffer.empty())
|
||||
buffer += uni::lf;
|
||||
String::size_type bufferLen = buffer.size();
|
||||
buffer.append(line.size(), uni::null);
|
||||
std::transform(line.begin(), line.end(), buffer.begin()+bufferLen, widen);
|
||||
appendChars(buffer, line.data(), line.size());
|
||||
if (!buffer.empty()) {
|
||||
showString(std::cout, buffer);
|
||||
std::cout << std::endl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user