mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-03 21:22:47 +00:00
Fix for VC++ compile.
This commit is contained in:
parent
2266954d60
commit
2c115aa7b4
@ -157,7 +157,7 @@ static JSValue load(Context *cx, const JSValues &argv)
|
|||||||
for (size_t i = 1; i < n; ++i) {
|
for (size_t i = 1; i < n; ++i) {
|
||||||
JSValue val = argv[i].toString();
|
JSValue val = argv[i].toString();
|
||||||
if (val.isString()) {
|
if (val.isString()) {
|
||||||
JSString& fileName(*val.string);
|
JSString& fileName = *val.string;
|
||||||
std::string str(fileName.length(), char());
|
std::string str(fileName.length(), char());
|
||||||
std::transform(fileName.begin(), fileName.end(), str.begin(), narrow);
|
std::transform(fileName.begin(), fileName.end(), str.begin(), narrow);
|
||||||
FILE* f = fopen(str.c_str(), "r");
|
FILE* f = fopen(str.c_str(), "r");
|
||||||
@ -179,7 +179,7 @@ static JSValue loadxml(Context *cx, const JSValues &argv)
|
|||||||
for (size_t i = 1; i < n; ++i) {
|
for (size_t i = 1; i < n; ++i) {
|
||||||
JSValue val = argv[i].toString();
|
JSValue val = argv[i].toString();
|
||||||
if (val.isString()) {
|
if (val.isString()) {
|
||||||
JSString& fileName(*val.string);
|
JSString& fileName = *val.string;
|
||||||
std::string str(fileName.length(), char());
|
std::string str(fileName.length(), char());
|
||||||
std::transform(fileName.begin(), fileName.end(), str.begin(), narrow);
|
std::transform(fileName.begin(), fileName.end(), str.begin(), narrow);
|
||||||
cx->loadClass(str.c_str());
|
cx->loadClass(str.c_str());
|
||||||
|
@ -157,7 +157,7 @@ static JSValue load(Context *cx, const JSValues &argv)
|
|||||||
for (size_t i = 1; i < n; ++i) {
|
for (size_t i = 1; i < n; ++i) {
|
||||||
JSValue val = argv[i].toString();
|
JSValue val = argv[i].toString();
|
||||||
if (val.isString()) {
|
if (val.isString()) {
|
||||||
JSString& fileName(*val.string);
|
JSString& fileName = *val.string;
|
||||||
std::string str(fileName.length(), char());
|
std::string str(fileName.length(), char());
|
||||||
std::transform(fileName.begin(), fileName.end(), str.begin(), narrow);
|
std::transform(fileName.begin(), fileName.end(), str.begin(), narrow);
|
||||||
FILE* f = fopen(str.c_str(), "r");
|
FILE* f = fopen(str.c_str(), "r");
|
||||||
@ -179,7 +179,7 @@ static JSValue loadxml(Context *cx, const JSValues &argv)
|
|||||||
for (size_t i = 1; i < n; ++i) {
|
for (size_t i = 1; i < n; ++i) {
|
||||||
JSValue val = argv[i].toString();
|
JSValue val = argv[i].toString();
|
||||||
if (val.isString()) {
|
if (val.isString()) {
|
||||||
JSString& fileName(*val.string);
|
JSString& fileName = *val.string;
|
||||||
std::string str(fileName.length(), char());
|
std::string str(fileName.length(), char());
|
||||||
std::transform(fileName.begin(), fileName.end(), str.begin(), narrow);
|
std::transform(fileName.begin(), fileName.end(), str.begin(), narrow);
|
||||||
cx->loadClass(str.c_str());
|
cx->loadClass(str.c_str());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user