mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
First row might still be ragged if multi dimensional. attrExists() doesn't throw, but easier to wrap in try ... catch than to explain in comment.
This commit is contained in:
parent
244b4aa07f
commit
9b73dacf50
@ -291,8 +291,10 @@ namespace Grid
|
|||||||
::H5::Exception::getAutoPrint(h5at, &f5at_p);
|
::H5::Exception::getAutoPrint(h5at, &f5at_p);
|
||||||
::H5::Exception::dontPrint();
|
::H5::Exception::dontPrint();
|
||||||
try {
|
try {
|
||||||
push(s);
|
push(s); // This is what might throw
|
||||||
bRagged = group_.attrExists(HDF5_GRID_GUARD "vector_size");
|
try {
|
||||||
|
bRagged = group_.attrExists(HDF5_GRID_GUARD "vector_size");
|
||||||
|
} catch(...) {}
|
||||||
pop();
|
pop();
|
||||||
} catch(...) {}
|
} catch(...) {}
|
||||||
::H5::Exception::setAutoPrint(h5at, f5at_p);
|
::H5::Exception::setAutoPrint(h5at, f5at_p);
|
||||||
|
@ -469,7 +469,7 @@ namespace Grid {
|
|||||||
bool isFlat(const std::vector<std::vector<T>> &v)
|
bool isFlat(const std::vector<std::vector<T>> &v)
|
||||||
{
|
{
|
||||||
// Make sure all of my rows are the same size
|
// Make sure all of my rows are the same size
|
||||||
for (std::size_t i = 1; i < v.size(); ++i)
|
for (std::size_t i = 0; i < v.size(); ++i)
|
||||||
{
|
{
|
||||||
if (v[i].size() != v[0].size() || !isFlat(v[i]))
|
if (v[i].size() != v[0].size() || !isFlat(v[i]))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user