initialisation error

This commit is contained in:
mattijs
2009-03-13 08:11:01 +00:00
parent 98028820f9
commit 38eb6f9958
3 changed files with 12 additions and 5 deletions

View File

@ -50,7 +50,8 @@ Foam::objectRegistry::objectRegistry
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE, IOobject::AUTO_WRITE,
false false
) ),
true // to flag that this is the top-level regIOobject
), ),
HashTable<regIOobject*>(nIoObjects), HashTable<regIOobject*>(nIoObjects),
time_(t), time_(t),

View File

@ -41,13 +41,18 @@ int Foam::regIOobject::fileModificationSkew
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from IOobject // Construct from IOobject
Foam::regIOobject::regIOobject(const IOobject& io) Foam::regIOobject::regIOobject(const IOobject& io, const bool isTime)
: :
IOobject(io), IOobject(io),
registered_(false), registered_(false),
ownedByRegistry_(false), ownedByRegistry_(false),
lastModified_(0), lastModified_(0),
eventNo_(db().getEvent()), eventNo_ // Do not get event for top level Time database
(
isTime
? 0
: db().getEvent()
),
isPtr_(NULL) isPtr_(NULL)
{ {
// Register with objectRegistry if requested // Register with objectRegistry if requested

View File

@ -99,8 +99,9 @@ public:
// Constructors // Constructors
//- Construct from IOobject //- Construct from IOobject. Optional flag for if IOobject is the
regIOobject(const IOobject&); // top level regIOobject.
regIOobject(const IOobject&, const bool isTime = false);
//- Construct as copy //- Construct as copy
regIOobject(const regIOobject&); regIOobject(const regIOobject&);