From: wolf Date: Tue, 8 Jun 1999 16:09:59 +0000 (+0000) Subject: Add some code to make the copiler happier with unitialized data members and copy... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d57f1b3105044f9cabfb9f2d98fed86e56bc0cd2;p=dealii-svn.git Add some code to make the copiler happier with unitialized data members and copy constructors, etc. git-svn-id: https://svn.dealii.org/trunk@1389 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/dofs/dof_handler.h b/deal.II/deal.II/include/dofs/dof_handler.h index f5c6a12d65..3406fd190c 100644 --- a/deal.II/deal.II/include/dofs/dof_handler.h +++ b/deal.II/deal.II/include/dofs/dof_handler.h @@ -1476,6 +1476,29 @@ class DoFHandler SmartPointer > selected_fe; private: + + /** + * Copy constructor. I can see no reason + * why someone might want to use it, so + * I don't provide it. Since this class + * has pointer members, making it private + * prevents the compiler to provide it's + * own, incorrect one if anyone chose to + * copy such an object. + */ + DoFHandler (const DoFHandler &); + + /** + * Copy operator. I can see no reason + * why someone might want to use it, so + * I don't provide it. Since this class + * has pointer members, making it private + * prevents the compiler to provide it's + * own, incorrect one if anyone chose to + * copy such an object. + */ + DoFHandler & operator = (const DoFHandler &); + /** * Reserve enough space in the * #levels[]# objects to store the diff --git a/deal.II/deal.II/include/fe/fe.h b/deal.II/deal.II/include/fe/fe.h index bb538aad67..e00421f722 100644 --- a/deal.II/deal.II/include/fe/fe.h +++ b/deal.II/deal.II/include/fe/fe.h @@ -141,6 +141,13 @@ class FiniteElementData const unsigned int n_transform_functions, const unsigned int n_components); + /** + * Declare this destructor virtual in + * order to make the respective destructors + * in derived classes virtual as well. + */ + virtual ~FiniteElementData (); + /** * Comparison operator. It is not clear to * me why we have to declare and implement diff --git a/deal.II/deal.II/include/numerics/error_estimator.h b/deal.II/deal.II/include/numerics/error_estimator.h index 144aed5e80..beafcd86b7 100644 --- a/deal.II/deal.II/include/numerics/error_estimator.h +++ b/deal.II/deal.II/include/numerics/error_estimator.h @@ -274,6 +274,7 @@ class KellyErrorEstimator { + /*---------------------------- error_estimator.h ---------------------------*/ /* end of #ifndef __error_estimator_H */ #endif diff --git a/deal.II/deal.II/include/numerics/time_dependent.h b/deal.II/deal.II/include/numerics/time_dependent.h index 74584b1642..72190f04ba 100644 --- a/deal.II/deal.II/include/numerics/time_dependent.h +++ b/deal.II/deal.II/include/numerics/time_dependent.h @@ -1000,6 +1000,27 @@ class TimeStepBase : public Subscriptor void set_sweep_no (const unsigned int sweep_no); + /** + * Copy constructor. I can see no reason + * why someone might want to use it, so + * I don't provide it. Since this class + * has pointer members, making it private + * prevents the compiler to provide it's + * own, incorrect one if anyone chose to + * copy such an object. + */ + TimeStepBase (const TimeStepBase &); + + /** + * Copy operator. I can see no reason + * why someone might want to use it, so + * I don't provide it. Since this class + * has pointer members, making it private + * prevents the compiler to provide it's + * own, incorrect one if anyone chose to + * copy such an object. + */ + TimeStepBase & operator = (const TimeStepBase &); // make the manager object a friend friend class TimeDependent;