Import Geant4 10.5.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2018-06-29 10:58:11 +02:00
parent fe81a77428
commit 6aa23be517
1581 changed files with 124288 additions and 83758 deletions
@@ -299,24 +299,24 @@ private:
};
#if defined G4EM_ALLOC_EXPORT
extern G4DLLEXPORT G4ThreadLocal G4Allocator<G4Molecule> *aMoleculeAllocator;
extern G4DLLEXPORT G4Allocator<G4Molecule>*& aMoleculeAllocator();
#else
extern G4DLLIMPORT G4ThreadLocal G4Allocator<G4Molecule> *aMoleculeAllocator;
extern G4DLLIMPORT G4Allocator<G4Molecule>*& aMoleculeAllocator();
#endif
//////////////////////////
inline void * G4Molecule::operator new(size_t)
//////////////////////////
{
if (!aMoleculeAllocator) aMoleculeAllocator = new G4Allocator<G4Molecule>;
return (void *) aMoleculeAllocator->MallocSingle();
if (!aMoleculeAllocator()) aMoleculeAllocator() = new G4Allocator<G4Molecule>;
return (void *) aMoleculeAllocator()->MallocSingle();
}
//////////////////////////
inline void G4Molecule::operator delete(void * aMolecule)
//////////////////////////
{
aMoleculeAllocator->FreeSingle((G4Molecule *) aMolecule);
aMoleculeAllocator()->FreeSingle((G4Molecule *) aMolecule);
}
#endif