STYLE: simplify Random constructors

COMP: use generated methods in a few more places
This commit is contained in:
Mark Olesen
2020-01-21 12:12:44 +01:00
parent d7c18a328c
commit ee96dba0cf
9 changed files with 64 additions and 70 deletions

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -124,6 +125,11 @@ bool Foam::ignitionSite::ignited() const
void Foam::ignitionSite::operator=(const ignitionSite& is)
{
if (this == &is)
{
return;
}
location_ = is.location_;
diameter_ = is.diameter_;
time_ = is.time_;

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -50,6 +51,7 @@ SourceFiles
namespace Foam
{
// Forward Declarations
class Time;
class engineTime;
class fvMesh;
@ -60,7 +62,7 @@ class fvMesh;
class ignitionSite
{
// Private data
// Private Data
const Time& db_;
const fvMesh& mesh_;
@ -88,10 +90,9 @@ class ignitionSite
public:
// Public classes
// Public Classes
//- Class used for the read-construction of
// PtrLists of ignitionSite
//- Read-construction of PtrLists of ignitionSite
class iNew
{
const Time& db_;
@ -112,6 +113,12 @@ public:
};
// Generated Methods
//- Copy construct
ignitionSite(const ignitionSite&) = default;
// Constructors
//- Construct from Istream and database