Commit af76a538 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed skipping of whitespace in VTKReader

parent cab2d0c1
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -318,6 +318,8 @@ protected:
               // skip the points coordinates
               for( std::int32_t j = 0; j < components * tuples; j++ )
                  skipValue( dataFormat, str, datatype );
               // skip end of line (or any whitespace)
               str >> std::ws;
            }
         }
         else if( name == "POINTS" ) {
@@ -328,6 +330,8 @@ protected:
            // skip the values
            for( std::int32_t j = 0; j < 3 * points_count; j++ )
               skipValue( dataFormat, str, datatype );
            // skip end of line (or any whitespace)
            str >> std::ws;
         }
         else if( name == "CELLS" ) {
            sectionPositions.insert( {"CELLS", currentPosition} );
@@ -337,6 +341,8 @@ protected:
            // skip the values
            for( std::int32_t j = 0; j < values_count; j++ )
               skipValue( dataFormat, str, "int" );
            // skip end of line (or any whitespace)
            str >> std::ws;
         }
         else if( name == "CELL_TYPES" ) {
            sectionPositions.insert( {"CELL_TYPES", currentPosition} );
@@ -347,6 +353,8 @@ protected:
            for( std::int32_t j = 0; j < count; j++ )
               // cell types are stored with great redundancy as int32 in the VTK file
               skipValue( dataFormat, str, "int" );
            // skip end of line (or any whitespace)
            str >> std::ws;
         }
         else if( name == "CELL_DATA" || name == "POINT_DATA" ) {
            if( cells_count == 0 || points_count == 0 )
@@ -424,6 +432,8 @@ protected:
                     // skip the points coordinates
                     for( std::int32_t j = 0; j < components * tuples; j++ )
                        skipValue( dataFormat, str, datatype );
                     // skip end of line (or any whitespace)
                     str >> std::ws;
                  }
                  continue;
               }
@@ -436,6 +446,8 @@ protected:
               // skip the values
               for( std::int32_t j = 0; j < elements * values_per_element; j++ )
                  skipValue( dataFormat, str, datatype );
               // skip end of line (or any whitespace)
               str >> std::ws;
            }
         }
         else