[cig-commits] r13727 - cs/cigma/trunk/src
luis at geodynamics.org
luis at geodynamics.org
Wed Dec 17 02:32:19 PST 2008
Author: luis
Date: 2008-12-17 02:32:19 -0800 (Wed, 17 Dec 2008)
New Revision: 13727
Modified:
cs/cigma/trunk/src/MeshPart.cpp
cs/cigma/trunk/src/Quadrature.cpp
Log:
Map empty location string to the root group "/"
Modified: cs/cigma/trunk/src/MeshPart.cpp
===================================================================
--- cs/cigma/trunk/src/MeshPart.cpp 2008-12-17 10:32:16 UTC (rev 13726)
+++ cs/cigma/trunk/src/MeshPart.cpp 2008-12-17 10:32:19 UTC (rev 13727)
@@ -87,7 +87,9 @@
{
HDF5_Reader *h5 = static_cast<HDF5_Reader*>(&(*reader));
- bool locIsGroup = h5->locationIsGroup(location.c_str());
+ string loc = location;
+ if (location == "") { loc = "/"; }
+ bool locIsGroup = h5->locationIsGroup(loc.c_str());
TRI_LOG(locIsGroup);
if (locIsGroup)
{
@@ -102,7 +104,7 @@
if (cell_type == Cell::NONE)
{
string cell_name;
- int status = h5->readAttrString(location.c_str(), "CellType", cell_name);
+ int status = h5->readAttrString(loc.c_str(), "CellType", cell_name);
TRI_LOG(status);
if (status == 0)
{
Modified: cs/cigma/trunk/src/Quadrature.cpp
===================================================================
--- cs/cigma/trunk/src/Quadrature.cpp 2008-12-17 10:32:16 UTC (rev 13726)
+++ cs/cigma/trunk/src/Quadrature.cpp 2008-12-17 10:32:19 UTC (rev 13727)
@@ -290,7 +290,9 @@
{
HDF5_Reader* h5 = static_cast<HDF5_Reader*>(&(*reader));
- bool locIsGroup = h5->locationIsGroup(location.c_str());
+ string loc = location;
+ if (location == "") { loc = "/"; }
+ bool locIsGroup = h5->locationIsGroup(loc.c_str());
TRI_LOG(locIsGroup);
if (locIsGroup)
{
@@ -306,7 +308,7 @@
if (cell_type == Cell::NONE)
{
string cell_name;
- int status = h5->readAttrString(location.c_str(), "CellType", cell_name);
+ int status = h5->readAttrString(loc.c_str(), "CellType", cell_name);
TRI_LOG(status);
if (status == 0)
{
More information about the CIG-COMMITS
mailing list