forked from github/verilator
Fix some C++11 requirements.
This commit is contained in:
parent
2982336ec2
commit
1234c83953
@ -1369,10 +1369,10 @@ void V3Options::parseOptsFile(FileLine* fl, const string& filename, bool rel) {
|
|||||||
|
|
||||||
// Convert to argv style arg list and parse them
|
// Convert to argv style arg list and parse them
|
||||||
std::vector<char*> argv; argv.reserve(args.size()+1);
|
std::vector<char*> argv; argv.reserve(args.size()+1);
|
||||||
for (const string &arg : args) {
|
for (std::vector<std::string>::const_iterator it = args.begin(); it != args.end(); ++it) {
|
||||||
argv.push_back(const_cast<char*>(arg.c_str()));
|
argv.push_back(const_cast<char*>(it->c_str()));
|
||||||
}
|
}
|
||||||
argv.push_back(nullptr); // argv is NULL-terminated
|
argv.push_back(NULL); // argv is NULL-terminated
|
||||||
parseOptsList(fl, optdir, static_cast<int>(argv.size()-1), argv.data());
|
parseOptsList(fl, optdir, static_cast<int>(argv.size()-1), argv.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ string V3Os::filenameSubstitute(const string& filename) {
|
|||||||
}
|
}
|
||||||
string envvar = filename.substr(pos+1, endpos-pos);
|
string envvar = filename.substr(pos+1, endpos-pos);
|
||||||
string envvalue;
|
string envvalue;
|
||||||
if (!envvar.empty()) envvalue = getenvStr(envvar, {});
|
if (!envvar.empty()) envvalue = getenvStr(envvar, "");
|
||||||
if (!envvalue.empty()) {
|
if (!envvalue.empty()) {
|
||||||
out += envvalue;
|
out += envvalue;
|
||||||
if (brackets==NONE) pos = endpos;
|
if (brackets==NONE) pos = endpos;
|
||||||
|
Loading…
Reference in New Issue
Block a user