Roll back workaround for upcoming libc++ bug which has since been fixed upstream.
PiperOrigin-RevId: 640479545 Change-Id: I8a3700ef0b52f5364dcd0903aba196293a96c220
This commit is contained in:
committed by
Copybara-Service
parent
4debe1344a
commit
a56b9c8bbd
@@ -481,16 +481,6 @@ bool mjXUtil::ReadAttrValues(XMLElement* elem, const char* attr,
|
||||
// read numbers
|
||||
for (int i = 0; (max < 0 || i < max) && !strm.eof(); ++i) {
|
||||
strm >> token;
|
||||
|
||||
// some C++ libraries do not allow .x instead of 0.x
|
||||
if (!token.empty()) {
|
||||
if (token[0] == std::string(".")[0]) {
|
||||
token = "0" + token;
|
||||
} else if (token[0] == std::string("-")[0] && token[1] == std::string(".")[0]) {
|
||||
token.insert(1, "0");
|
||||
}
|
||||
}
|
||||
|
||||
std::istringstream token_strm(token);
|
||||
token_strm >> item;
|
||||
if (token_strm.fail() || !token_strm.eof()) {
|
||||
|
||||
Reference in New Issue
Block a user