Commit 673e42df authored by Yumin Yuan's avatar Yumin Yuan Committed by Code Review
Browse files

Merge topic 'delimited_text_reader_bug' into master

0db52347 Delimited text reader not correctly stripping spaces
parents 5dbf4004 0db52347
......@@ -976,11 +976,8 @@ T vtkVariantStringToNumeric(vtkStdString str, bool* valid, T* vtkNotUsed(ignored
vtksys_ios::istringstream vstr(str);
T data;
vstr >> data;
// Check for a valid result
bool v = ( ((vstr.rdstate() & ios::badbit) == 0)
&& ((vstr.rdstate() & ios::failbit) == 0)
&& vstr.eof() );
//v = (vstr.rdstate() == ios::goodbit);
vstr >> std::ws; // eat whitespace after number
bool v = ( !vstr.fail() && vstr.eof() );
if (valid) *valid = v;
if (!v)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment