mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 10:10:33 +05:00
Fix of 0022218: EDF 2638 SMESH: Issue when importing UNV file:
read the whole line instead of chars set.
This commit is contained in:
parent
d9e7f2c591
commit
1227aa421b
@ -128,15 +128,14 @@ namespace UNV{
|
|||||||
*/
|
*/
|
||||||
inline std::string read_line(std::ifstream& in_stream, const bool next=true)
|
inline std::string read_line(std::ifstream& in_stream, const bool next=true)
|
||||||
{
|
{
|
||||||
char line[theMaxLineLen];
|
std::string resLine;
|
||||||
in_stream.getline( line, theMaxLineLen );
|
std::getline( in_stream, resLine );
|
||||||
if ( next )
|
if ( next )
|
||||||
in_stream.getline( line, theMaxLineLen );
|
std::getline( in_stream, resLine );
|
||||||
|
|
||||||
std::string resLine = line;
|
|
||||||
if ( resLine.size() > 0 && resLine[ resLine.size()-1 ] == '\r' )
|
if ( resLine.size() > 0 && resLine[ resLine.size()-1 ] == '\r' )
|
||||||
resLine.resize( resLine.size()-1 );
|
resLine.resize( resLine.size()-1 );
|
||||||
return line;
|
return resLine;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user