ENH: Only store previous time name if it is not at the current head

This commit is contained in:
Andrew Heather
2019-04-17 09:13:44 +01:00
parent e6ddde737a
commit 8b81dacfc4

View File

@ -654,8 +654,11 @@ bool Foam::Time::writeObject
{
// Does the writeTime trigger purging?
if (writeTime_ && purgeWrite_)
{
if (previousWriteTimes_.top() != timeName())
{
previousWriteTimes_.push(timeName());
}
while (previousWriteTimes_.size() > purgeWrite_)
{