1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-14 01:45:35 +00:00

HDF5: compatibility fix for pre-C++11 ABI

This commit is contained in:
Antonin Portelli 2015-11-03 15:57:01 +00:00 committed by Antonin Portelli
parent f251769a1c
commit 1b0bdf074a

View File

@ -100,7 +100,8 @@ void Hdf5File::save(const DMatSample &sample, const string &name)
FOR_STAT_ARRAY(sample, s) FOR_STAT_ARRAY(sample, s)
{ {
datasetName = (s == central) ? "data_C" : ("data_S_" + strFrom(s)); datasetName = (s == central) ? "data_C" : ("data_S_" + strFrom(s));
dataset = group.createDataSet(datasetName, PredType::NATIVE_DOUBLE, dataset = group.createDataSet(datasetName.c_str(),
PredType::NATIVE_DOUBLE,
dataSpace); dataSpace);
dataset.write(sample[s].data(), PredType::NATIVE_DOUBLE); dataset.write(sample[s].data(), PredType::NATIVE_DOUBLE);
} }
@ -312,7 +313,8 @@ string Hdf5File::load(const string &name)
} }
else else
{ {
dataset = group.openDataSet("data_S_" + strFrom(s)); dataset =
group.openDataSet(("data_S_" + strFrom(s)).c_str());
} }
load((*pt)[s], dataset); load((*pt)[s], dataset);
} }