Commit c7fdba20 authored by Andrew J. Burns (Cont's avatar Andrew J. Burns (Cont

fixed controller addition issue during append

parent 88ed3531
......@@ -702,10 +702,10 @@ XdmfHDF5Writer::write(XdmfArray & array,
}
if (mMode == Append) {
//if the written filename is different write add the previous controller
if (*((filesWritten.end())--) != heavyDataController->getFilePath()) {
if (*(filesWritten.rbegin()) != heavyDataController->getFilePath()) {
//should also be different from previous controller
if (filesWritten.size() > 1) {
if (*((filesWritten.end())--) != *(((filesWritten.end())--)--)) {
if (*(filesWritten.rbegin()) != *((filesWritten.rbegin())++)) {
array.insert(heavyDataController);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment