mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-10-31 03:54:33 +00: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:
		| @@ -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])) | ||||||
|       { |       { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user