Handle nr newlines
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
<b>IO</b>
|
<b>IO</b>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>PLY Reader: Handle nr newlines (Thanks to Christian Feurer for the patch)</li>
|
||||||
<li>PLY Reader: Fixed binary reader errors in ply reader. (Thanks to Michael Kremer for the patch)</li>
|
<li>PLY Reader: Fixed binary reader errors in ply reader. (Thanks to Michael Kremer for the patch)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
@@ -1076,6 +1076,10 @@ bool _PLYReader_::can_u_read(std::istream& _is) const {
|
|||||||
std::getline(_is, line);
|
std::getline(_is, line);
|
||||||
trim(line);
|
trim(line);
|
||||||
|
|
||||||
|
// Handle '\r\n' newlines
|
||||||
|
const int s = line.size();
|
||||||
|
if( s > 0 && line[s - 1] == '\r') line.resize(s - 1);
|
||||||
|
|
||||||
//Check if this file is really a ply format
|
//Check if this file is really a ply format
|
||||||
if (line != "PLY" && line != "ply")
|
if (line != "PLY" && line != "ply")
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user