Closed adamhooper closed 3 years ago
Whoop. I'm seeing errors in my other test suite. I'll hack at this some more.
Oh, never mind my trepidation. The errors I mentioned 40 minutes ago were because I didn't apply the patch correctly. All is well here :).
Nice one! I'll review and merge soon.
Previously, an empty row would mess with the parser: if we're in an empty row, our helper methods don't detect us as being in the "row" or in the "sheetData". So
has_cell()
would return false when it shouldn't. Similarly,read_cell()
wouldn't skip rows; soread_cell()
would return an invalid cell when placed in an empty row, causing a segfault when the caller tried to use the cell.Callers must take care to call
has_next()
beforeread_next()
. In the future, perhaps we can makeread_next()
return astd::optional
and nixhas_next()
altogether?[Closes #492]
(The test file is a modified file from the Bureau of Labor Statistics -- public domain.)